aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2022-12-29 01:25:48 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2022-12-29 01:25:48 +0000
commit8a6eb8e025f388c9bc23e5ef30a0991eb33b7365 (patch)
tree52026e79a8fa14bbf61cdb02c9a6ea1a1f09966a /app/src/main/res
parentb97721a1e7c8611800b589cf34dd49dedc28ce16 (diff)
downloadinfinity-for-reddit-8a6eb8e025f388c9bc23e5ef30a0991eb33b7365.tar
infinity-for-reddit-8a6eb8e025f388c9bc23e5ef30a0991eb33b7365.tar.gz
infinity-for-reddit-8a6eb8e025f388c9bc23e5ef30a0991eb33b7365.tar.bz2
infinity-for-reddit-8a6eb8e025f388c9bc23e5ef30a0991eb33b7365.tar.lz
infinity-for-reddit-8a6eb8e025f388c9bc23e5ef30a0991eb33b7365.tar.xz
infinity-for-reddit-8a6eb8e025f388c9bc23e5ef30a0991eb33b7365.tar.zst
infinity-for-reddit-8a6eb8e025f388c9bc23e5ef30a0991eb33b7365.zip
Change the style of the bottom app bar.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/bottom_app_bar.xml66
-rw-r--r--app/src/main/res/menu/bottom_app_bar.xml20
2 files changed, 26 insertions, 60 deletions
diff --git a/app/src/main/res/layout/bottom_app_bar.xml b/app/src/main/res/layout/bottom_app_bar.xml
index 47a35792..7e55c2ba 100644
--- a/app/src/main/res/layout/bottom_app_bar.xml
+++ b/app/src/main/res/layout/bottom_app_bar.xml
@@ -3,64 +3,10 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/bottom_app_bar_bottom_app_bar"
android:layout_width="match_parent"
- android:layout_height="48dp"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
android:visibility="gone"
- app:fabAlignmentMode="center">
-
- <LinearLayout
- android:id="@+id/linear_layout_bottom_app_bar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingTop="6dp"
- android:weightSum="5">
-
- <ImageView
- android:id="@+id/option_1_bottom_app_bar"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:background="?attr/selectableItemBackgroundBorderless" />
-
- <ImageView
- android:id="@+id/option_2_bottom_app_bar"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:background="?attr/selectableItemBackgroundBorderless" />
-
- <TextView
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@android:color/transparent"/>
-
- <ImageView
- android:id="@+id/option_3_bottom_app_bar"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:background="?attr/selectableItemBackgroundBorderless" />
-
- <ImageView
- android:id="@+id/option_4_bottom_app_bar"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginEnd="16dp"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:gravity="center"
- android:background="?attr/selectableItemBackgroundBorderless" />
-
- </LinearLayout>
-
-</com.google.android.material.bottomappbar.BottomAppBar> \ No newline at end of file
+ style="@style/Widget.Material3.BottomAppBar"
+ app:hideOnScroll="true"
+ app:fabAlignmentMode="end"
+ app:menu="@menu/bottom_app_bar" /> \ No newline at end of file
diff --git a/app/src/main/res/menu/bottom_app_bar.xml b/app/src/main/res/menu/bottom_app_bar.xml
new file mode 100644
index 00000000..c98673c3
--- /dev/null
+++ b/app/src/main/res/menu/bottom_app_bar.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+ <item
+ android:id="@+id/bottom_app_bar_option_1"
+ android:enabled="true"
+ app:showAsAction="always" />
+ <item
+ android:id="@+id/bottom_app_bar_option_2"
+ android:enabled="true"
+ app:showAsAction="always" />
+ <item
+ android:id="@+id/bottom_app_bar_option_3"
+ android:enabled="true"
+ app:showAsAction="always" />
+ <item
+ android:id="@+id/bottom_app_bar_option_4"
+ android:enabled="true"
+ app:showAsAction="always" />
+</menu> \ No newline at end of file