[英]Settings activity not supporting dark mode in Android Studio in Java
所以我的 root_preferences.xml 中的暗模式有问题,当手机处于亮模式时,一切都可见,但是当用户打开暗模式并尝试更改设置中的某些内容时,按钮“确定”和“取消” " 将它们的颜色更改为深灰色,它们几乎看不见。 我的活动中按钮文本的颜色也变为深灰色,但这是不同的情况,如果有人知道解决方案会很好。
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory app:title="Settings">
<EditTextPreference
android:key="weight"
android:selectAllOnFocus="true"
android:singleLine="true"
android:title="Weight"
android:summary=""/>
</PreferenceCategory>
</PreferenceScreen>
所以基本上你所要做的就是 go 进入主题和夜间主题并改变 primaryVariant 颜色
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.