diff options
Diffstat (limited to 'main/src/ui/res')
-rw-r--r-- | main/src/ui/res/layout/main_activity.xml | 28 | ||||
-rw-r--r-- | main/src/ui/res/values/styles.xml | 17 |
2 files changed, 28 insertions, 17 deletions
diff --git a/main/src/ui/res/layout/main_activity.xml b/main/src/ui/res/layout/main_activity.xml index d47bacc5..b2fe2251 100644 --- a/main/src/ui/res/layout/main_activity.xml +++ b/main/src/ui/res/layout/main_activity.xml @@ -4,25 +4,27 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> <androidx.viewpager.widget.ViewPager - android:id="@+id/pager" - android:layout_width="match_parent" - android:layout_height="match_parent"> + android:id="@+id/pager" + android:layout_width="match_parent" + android:layout_height="match_parent"> <com.google.android.material.tabs.TabLayout - style="@style/AppTabLayout" - android:id="@+id/tab_layout" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="top" + android:id="@+id/tab_layout" + style="@style/blinkt.tabLayout" + app:tabMaxWidth="0dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="top" + app:tabMode="scrollable" - /> + /> </androidx.viewpager.widget.ViewPager> diff --git a/main/src/ui/res/values/styles.xml b/main/src/ui/res/values/styles.xml index f90da367..e422124d 100644 --- a/main/src/ui/res/values/styles.xml +++ b/main/src/ui/res/values/styles.xml @@ -79,20 +79,29 @@ <item name="android:windowContentOverlay">@null</item> </style> - <style name="AppTabLayout" parent="Widget.Design.TabLayout"> + <style name="blinkt.tabLayout" parent="Widget.Design.TabLayout"> <item name="tabIndicatorColor">?attr/colorAccent</item> <item name="tabIndicatorHeight">4dp</item> - <item name="tabPaddingStart">2dp</item> - <item name="tabPaddingEnd">2dp</item> + <item name="tabBackground">@color/primary</item> <item name="tabTextAppearance">@style/AppTabTextAppearance</item> <item name="tabSelectedTextColor">@android:color/white</item> + + <!-- <item name="tabPaddingStart">10dp</item>--> + <!-- <item name="tabPaddingEnd">10dp</item>--> + + + <item name="tabGravity">fill</item> + <item name="tabMaxWidth">0dp</item> + </style> - <!-- for text --> <style name="AppTabTextAppearance" parent="TextAppearance.Design.Tab"> <item name="textAllCaps">true</item> + <item name="android:textStyle">bold</item> + <item name="android:textColor">@color/tab_text</item> </style> + </resources>
\ No newline at end of file |