0
votes

I've searched for a solution, but haven't found one yet.

I'm currently in the process of creating an Android app and my team wants to keep the experience of our app the same across the recent Android versions. We're using the Support v7 library, so most of the Material Design elements can be used in our app, but we're kinda struggling to find a replacement for the tinted status bar. We've got a nice bar on Lollipop, but Kitkat is stuck with the ugly black bar and we'd really like to change that.

We were thinking about a translucent bar for pre-Lollipop devices, but we're not sure on how to approach that. I've tried copying the styles.xml to a new folder, values-v19, and adding

<item name="android:windowTranslucentStatus">true</item>
<item name="android:fitsSystemWindows">true</item>

to the styles, but this is also applied to my phone running Android 5.0.2, strangely enough.

Do you happen to know how to fix this or another method to create a similar effect? I'm new to Android, so detailed explanations will be appreciated.

1

1 Answers

2
votes

Try adding

<item name="android:windowTranslucentStatus">false</item>
<item name="android:fitsSystemWindows">false</item>

to either values/styles.xml or values-v21/styles.xml.

When you define a style for a certain API level it will be applied not only to that version, but also to all higher versions, unless explicitly specified otherwise.