如何解决对话框/导航抽屉背景中视图的选择性淡入淡出Android
对话框或打开的导航抽屉的背景是默认的。当出现对话框或导航抽屉打开时,我希望背景中的所有内容都褪色,但我的徽标除外。我如何做到这一点?
我尝试创建样式并将其应用到我的徽标中,如下所示:
在我的styles.xml中:
<style name="Theme.DoNotDim" parent="android:Theme">
<item name="android:backgroundDimEnabled">false</item>
</style>
在我的布局中:
<ImageView
android:layout_width="@dimen/_75sdp"
android:layout_height="wrap_content"
android:src="@drawable/logo"
style="@style/Theme.DoNotDim"
app:layout_constraintHorizontal_bias="0.04"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
但这没有用。请提出解决方案。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。