【发布时间】:2013-08-29 17:16:42
【问题描述】:
我想制作一个类似 iOS 7 的抽屉,我可以从底部滑动,不会覆盖全屏,并且在 Android 上是半透明/模糊的。
我在 android 上查看了 SlidingDrawer 以尝试开始,但它看起来像是被贬值了。如何在 android 上创建类似的未来证明效果?
【问题讨论】:
-
这可能对您有帮助吗? stackoverflow.com/questions/13678595/…
我想制作一个类似 iOS 7 的抽屉,我可以从底部滑动,不会覆盖全屏,并且在 Android 上是半透明/模糊的。
我在 android 上查看了 SlidingDrawer 以尝试开始,但它看起来像是被贬值了。如何在 android 上创建类似的未来证明效果?
【问题讨论】:
只需更改在导航抽屉片段中填充的列表视图的背景颜色。
使用背景颜色“#22FFFFFF”使导航抽屉半透明
使用十六进制颜色代码,其中包含 Alpha 的两位数字和颜色本身的六位数字,如下所示:
使用 android:background ="#88676767" 将前 88 更改为您选择的不透明度
android:background="#c0000000" - 更多黑暗
如果有帮助,请给它评分。
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#22FFFFFF"
tools:context="com.Navigation Drawer Fragment" />
【讨论】: