Akb*_*bar 5 android android-biometric-prompt theme-daynight
DayNight 主题有四种情况:
第一种和第二种情况是正常的。不幸的是,第三和第四种情况并不如预期。BiometricPrompt 对话框获取设备的 ui 模式。我想为 BiometricPrompt 对话框应用应用程序 UI 模式。您可以在下面看到问题:
小智 0
Interesting question!
From your question it is clear that device and application roles are switched throughout all 4 scenarios (but only apparent when there is a difference in colors)
Some resources to check out and that form basis of my answer: https://developer.android.com/guide/topics/ui/look-and-feel/darktheme
Some background:
The authentication layout is built with soft-coded colors (theme attributed) which allow for night-theme to function (as shown in your pictures)
The layout is not set up to inherit from night-theme (the activity's job)
显示身份验证对话框的方法使用片段(而不是活动),这可能是它在 uiMode 下无法正常工作的原因。必须在清单中设置活动才能支持 uiMode。不确定这如何与片段一起使用
uiMode 配置更改自动重建活动
我的答案:
由于用户身份验证的优先级较高,因此身份验证对话框的优先级高于“设备”活动,而对话框背后的活动则被委托为“应用程序”角色。目前尚不清楚为什么或如何发生这种情况。我会尝试在 DayNight 主题的实现过程中切换设备和应用程序的角色。
| 归档时间: |
|
| 查看次数: |
447 次 |
| 最近记录: |