rotate tab indicator when tab bar is at the bottom (#4793)
Looks way better imho Before  After 
This commit is contained in:
parent
eb83cb7d17
commit
40124a8258
2 changed files with 19 additions and 0 deletions
18
app/src/main/res/drawable/tab_indicator_bottom.xml
Normal file
18
app/src/main/res/drawable/tab_indicator_bottom.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:left="2dp"
|
||||
android:right="2dp">
|
||||
<shape
|
||||
android:shape="rectangle">
|
||||
<!-- Color is assigned programmatically with the value of "tabIndicatorColor". -->
|
||||
<solid android:color="@android:color/white"/>
|
||||
<corners
|
||||
android:bottomLeftRadius="3dp"
|
||||
android:bottomRightRadius="3dp"
|
||||
android:topLeftRadius="0dp"
|
||||
android:topRightRadius="0dp"/>
|
||||
<size android:height="3dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
|
@ -81,6 +81,7 @@
|
|||
android:background="?attr/colorSurface"
|
||||
app:tabGravity="fill"
|
||||
app:tabIndicatorGravity="top"
|
||||
app:tabIndicator="@drawable/tab_indicator_bottom"
|
||||
app:tabMode="scrollable"
|
||||
app:tabPaddingTop="0dp" />
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue