Issue
Describe my situation in short, I have a multi themes project with style.xml
and style.xml(v21)
. The only difference of these two versions is that in each theme of v21 version has these two line in addition:
<item name="android:navigationBarColor">?attr/colorPrimaryDark</item>
<item name="android:statusBarColor">?attr/colorPrimaryDark</item>
And I don't what two maintain two style files since they are too familiar, so is there any way I can merge these two style xml file ,or make the v21 one extends style.xml
and when I what to make some modification, I only have to work with style.xml
Solution
Is this what you mean?
Place this in your "Normal" theme folder
<!--Standard-->
<style name="CommonTheme" parent="Theme.AppCompat.NoActionBar">
<!--Place all common elements here-->
</style>
<!--Standard-->
<style name="AppTheme" parent="CommonTheme">
</style>
Place this in your V21 folder
<!--V21-->
<style name="AppTheme" parent="CommonTheme">
<item name="android:navigationBarColor">?attr/colorPrimaryDark</item>
<item name="android:statusBarColor">?attr/colorPrimaryDark</item>
</style>
Answered By - Kuffs
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.