I want to create a new Activity, with black system navigationbar color, like this:
Manifest:
<activity
android:name=".activity.MyActivity"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar" />
styles.xml:
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:navigationBarColor">@color/colorBlack</item>
<item name="android:windowTranslucentNavigation">false</item>
</style>
I also tried setting the color in the Activity with window.navigationBarColor = getColor(R.color.colorBlack)
, but it's not working...
What sould I do?
CodePudding user response:
You can try using sth like this:
<style name="AppTheme" parent="Theme.AppCompat">
<item name="android:navigationBarColor">@color/my_color</item>
</style>
android:navigationBarColor
should do the trick.
Here you have a thread regarding this topic: How to change system navigation bar color