![](/img/trans.png)
[英]How to disable night mode in my application even if night mode is enable in android Q?
[英]How to disable Android night mode for notifications?
我的應用程序有一個使用 RemoteViews 發送通知的前台服務。 當用戶選擇 Android 的夜間模式時,他無法再閱讀通知,因為它是黑色背景上的黑色文本。
有沒有辦法為我的應用程序的通知禁用夜間模式?
我嘗試使用AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
在通知服務 class onCreate 但它不起作用。
我將使用白色字體顏色制作夜間模式布局。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.