From 40124a82586709ae5608b79fbb3eafaec17fb3ce Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Fri, 6 Dec 2024 11:18:20 +0100 Subject: [PATCH] rotate tab indicator when tab bar is at the bottom (#4793) Looks way better imho Before ![before](https://github.com/user-attachments/assets/5888e2ee-c342-4b06-a834-50f9d07951b4) After ![after](https://github.com/user-attachments/assets/024e0c98-1e0a-4a4d-82f7-a7ede657ad25) --- .../main/res/drawable/tab_indicator_bottom.xml | 18 ++++++++++++++++++ app/src/main/res/layout/activity_main.xml | 1 + 2 files changed, 19 insertions(+) create mode 100644 app/src/main/res/drawable/tab_indicator_bottom.xml diff --git a/app/src/main/res/drawable/tab_indicator_bottom.xml b/app/src/main/res/drawable/tab_indicator_bottom.xml new file mode 100644 index 000000000..82ce65a38 --- /dev/null +++ b/app/src/main/res/drawable/tab_indicator_bottom.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index ea775a401..7c39d4b60 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -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" />