Project

General

Profile

« Previous | Next » 

Revision 5cfca381

Added by Leszek Koltunski about 3 years ago

Improve the background color of the selected tab in all dialogs.

View differences:

src/main/res/drawable/tab_background.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3
    <item android:drawable="@drawable/tab_background_selected" android:state_selected="true" />
4
    <item android:drawable="@drawable/tab_background_unselected" android:state_selected="false" android:state_focused="false" android:state_pressed="false" />
5
</selector>
src/main/res/drawable/tab_background_selected.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
3
    <solid android:color="@color/grey"/>
4
</shape>
src/main/res/drawable/tab_background_unselected.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
3
    <solid android:color="@color/dark_grey"/>
4
</shape>
src/main/res/values/styles.xml
16 16
    </style>
17 17

  
18 18
   <style name="MaterialThemeNoActionBar" parent="@style/Theme.MaterialComponents.NoActionBar">
19
        <item name="tabBackground">@drawable/tab_background</item>
20
        <item name="tabIndicatorHeight">0dp</item>
19 21
        <item name="android:windowNoTitle">true</item>
20 22
        <item name="android:windowActionBar">false</item>
21 23
        <item name="android:windowFullscreen">true</item>

Also available in: Unified diff