I have two different styles of TabLayout
in my app:
<style name="TabLayoutPower" parent="Widget.Design.TabLayout">
<item name="tabSelectedTextColor">@android:color/white</item>
<item name="tabTextColor">@android:color/white</item>
</style>
<style name="TabLayoutFree" parent="Widget.Design.TabLayout">
<item name="tabSelectedTextColor">@android:color/black</item>
<item name="tabTextColor">@android:color/black</item>
</style>
How can I define the default TabLayout
style for a theme? I cannot find any info which item name should I use to build my theme. I'd like to add the TabLayout the same way I added my listview:
<style name="Free" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/black</item>
<item name="colorPrimaryDark">@color/black</item>
<item name="colorAccent">@color/main_red</item>
<item name="android:windowBackground">@color/main_bg_light</item>
<item name="android:listViewStyle">@style/MyListView</item>
</style>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…