在Android API级别上禁用Darkmode< 29(q)
我将此行放入我的style.xml中,以在我的应用程序上禁用黑暗/夜间模式:
< item name =“ android:forcedarklowered”工具:targetapi =“ q” q“ q”> false</item>
当然,它适用于Android 10及更高版本。但是目前,我也想在以前的Android版本上禁用黑暗模式,但我找不到如何...
I put this line into my style.xml to disable dark/night mode on my app:
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
and of course, it works for Android 10 and higher. But currently, I also want to disable dark mode on the previous android version, but i dont find how...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试在每项活动中添加这些行的下方,并查看是否有效
You Can try adding these line just below onCreate method in each and every activity and see if it works