Selaa lähdekoodia

Tweak ActionToolbar styling

arkon 5 vuotta sitten
vanhempi
commit
bbf456a4aa

+ 25 - 15
app/src/main/res/layout/common_action_toolbar.xml

@@ -1,26 +1,36 @@
 <?xml version="1.0" encoding="utf-8"?>
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/common_action_toolbar"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content">
+    android:layout_height="wrap_content"
+    android:clipToPadding="false"
+    android:padding="8dp"
+    android:visibility="gone"
+    tools:visibility="visible">
 
-    <com.google.android.material.appbar.MaterialToolbar
-        android:id="@+id/common_action_toolbar"
+    <androidx.cardview.widget.CardView
         android:layout_width="match_parent"
-        android:layout_height="?attr/actionBarSize"
-        android:layout_gravity="bottom"
-        android:background="?attr/colorPrimary"
-        android:elevation="2dp"
-        android:theme="?attr/actionBarTheme"
-        android:visibility="gone"
-        app:contentInsetEnd="8dp"
-        app:contentInsetStart="8dp">
+        android:layout_height="wrap_content"
+        app:cardCornerRadius="@dimen/card_radius">
 
-        <androidx.appcompat.widget.ActionMenuView
-            android:id="@+id/common_action_menu"
+        <com.google.android.material.appbar.MaterialToolbar
             android:layout_width="match_parent"
-            android:layout_height="match_parent" />
+            android:layout_height="?attr/actionBarSize"
+            android:layout_gravity="bottom"
+            android:background="?attr/colorSurface"
+            android:theme="?attr/actionBarTheme"
+            app:contentInsetEnd="8dp"
+            app:contentInsetStart="8dp">
 
-    </com.google.android.material.appbar.MaterialToolbar>
+            <androidx.appcompat.widget.ActionMenuView
+                android:id="@+id/common_action_menu"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent" />
+
+        </com.google.android.material.appbar.MaterialToolbar>
+
+    </androidx.cardview.widget.CardView>
 
 </FrameLayout>

+ 8 - 16
app/src/main/res/layout/library_controller.xml

@@ -3,24 +3,16 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
-    <LinearLayout
+    <androidx.viewpager.widget.ViewPager
+        android:id="@+id/library_pager"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical">
+        android:layout_height="match_parent" />
 
-        <androidx.viewpager.widget.ViewPager
-            android:id="@+id/library_pager"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1" />
-
-        <eu.kanade.tachiyomi.widget.ActionToolbar
-            android:id="@+id/action_toolbar"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="bottom" />
-
-    </LinearLayout>
+    <eu.kanade.tachiyomi.widget.ActionToolbar
+        android:id="@+id/action_toolbar"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom" />
 
     <eu.kanade.tachiyomi.widget.EmptyView
         android:id="@+id/empty_view"