i don't know how to change the text of the status bar on android API 29. i want change the text and icon to black color. How to fix it please?
i tried this, but i have an error: error
i don't know how to change the text of the status bar on android API 29. i want change the text and icon to black color. How to fix it please?
i tried this, but i have an error: error
UPDATING MIN API FROM 21 TO 23
you just need to go in your app's build.gradle
file and change version like this:
android {
....
defaultConfig {
...
minSdk 23 // just replace minSdk 21 with minSdk 23 here
...
}
}
UPDATE:
Inside your themes.xml
file in the res -> values
, you should add these 2 attributes. This produces the following output on API level 30 for me. (Image below)
<resources>
<style>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">@color/white</item>
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>
Old Answer:
try this inside your Activity's onCreate()
method and let me know if that works as expected for you :)
window.statusBarColor = resources.getColor(R.color.colorPrimaryDark)