Browse Source

Adjust bottom sheet item to material 3

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 3 years ago
parent
commit
e2e4f69143
1 changed files with 24 additions and 13 deletions
  1. 24 13
      app/src/main/res/layout/menu_item_sheet.xml

+ 24 - 13
app/src/main/res/layout/menu_item_sheet.xml

@@ -2,6 +2,8 @@
   ~ Nextcloud Talk application
   ~
   ~ @author Mario Danic
+  ~ @author Andy Scherzinger
+  ~ Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
   ~ Copyright (C) 2017-2019 Mario Danic <mario@lovelyhq.com>
   ~
   ~ This program is free software: you can redistribute it and/or modify
@@ -18,27 +20,36 @@
   ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   -->
 
-<FrameLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
+<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"
     style="@style/MD_ListItem">
-    <RelativeLayout
+
+    <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="56dp"
+        android:gravity="center_vertical">
+
         <ImageView
             android:id="@+id/icon"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:scaleType="center"
-            android:layout_centerVertical="true"
-            tools:src="@drawable/ic_delete_grey600_24dp"
             android:layout_marginStart="16dp"
+            android:scaleType="center"
+            app:tint="@color/grey_600"
             tools:ignore="ContentDescription"
-            />
+            tools:src="@drawable/ic_delete_grey600_24dp" />
+
         <com.afollestad.materialdialogs.internal.rtl.RtlTextView
             android:id="@+id/title"
-            tools:text="Item"
-            android:layout_toEndOf="@id/icon"
-            style="@style/MD_ListItemText" />
-    </RelativeLayout>
-</FrameLayout>
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="start|center_vertical"
+            android:paddingStart="@dimen/standard_double_padding"
+            android:paddingEnd="@dimen/standard_padding"
+            android:textAlignment="viewStart"
+            android:textColor="@color/high_emphasis_text"
+            android:textSize="@dimen/bottom_sheet_text_size"
+            tools:text="Menu item" />
+    </LinearLayout>
+</FrameLayout>