ionic-framework - ionic statusbar.styleDefault() 不适用于 andorid
问题描述
我想在我的白色主题中有一个带有黑色字体的白色状态栏。问题是styleDefault()
为它制作的方法不起作用。但是这个错误只发生在 iOS 上的 Android 上,它运行良好。有什么方法可以将状态栏上的字体颜色更改为黑色(仅适用于 android)或使用 css 更改它?或者我怎样才能让styleDefault()
(深色文本,浅色背景)再次工作?
这是我的代码:
private setStatusBarStyle(darkTheme: boolean) {
if (darkTheme) {
this.statusBar.styleLightContent();
} else {
this.statusBar.styleDefault();
}
}
解决方案
推荐阅读
- c# - MICROS 8700 返回的固定消息格式未记录
- java - 如何生成和遍历解析树?
- angular - 使用 forRoot() 将环境变量传递给自定义库
- json.net - 使用 Json.Net 从 UI 中隐藏类型,但改为公开其属性之一
- windows - Firebird 仅适用于 ip 127.0.0.1,我需要使用 localhost
- javascript - 如何返回父窗口 - onclick
- python - 如何根据具有重复键值对的数据框行将值附加到python字典中的键
- selenium - Selenium 网格与自动化框架的集成
- ping - OpenDayLight 不更新 ARP 流
- python - 创建稳定的图像 Python Arcade