【问题标题】:Android semi transparent sliding drawer安卓半透明滑动抽屉
【发布时间】:2013-08-29 17:16:42
【问题描述】:

我想制作一个类似 iOS 7 的抽屉,我可以从底部滑动,不会覆盖全屏,并且在 Android 上是半透明/模糊的。

我在 android 上查看了 SlidingDrawer 以尝试开始,但它看起来像是被贬值了。如何在 android 上创建类似的未来证明效果?

【问题讨论】:

标签: android drawer


【解决方案1】:

只需更改在导航抽屉片段中填充的列表视图的背景颜色。

使用背景颜色“#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" />

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多