Pārlūkot izejas kodu

accessibility: 48dp hitbox for send-button plus update from image-button to material button

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 4 gadi atpakaļ
vecāks
revīzija
77b53a1044
1 mainītis faili ar 14 papildinājumiem un 16 dzēšanām
  1. 14 16
      src/main/res/layout/file_details_activities_fragment.xml

+ 14 - 16
src/main/res/layout/file_details_activities_fragment.xml

@@ -19,9 +19,10 @@
 -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              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">
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -33,25 +34,22 @@
         <com.google.android.material.textfield.TextInputEditText
             android:id="@+id/commentInputField"
             android:layout_width="0dp"
-            android:layout_height="wrap_content"
+            android:layout_height="@dimen/minimum_size_for_touchable_area"
             android:layout_weight="1"
             android:hint="@string/new_comment"
-            android:paddingTop="@dimen/standard_padding"
+            android:layout_marginTop="@dimen/standard_half_margin"
             android:textColorHint="@color/secondary_text_color" />
 
-        <ImageButton
+        <com.google.android.material.button.MaterialButton
             android:id="@+id/submitComment"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:background="?attr/selectableItemBackgroundBorderless"
+            style="@style/Widget.AppTheme.Button.IconButton"
+            android:layout_width="@dimen/minimum_size_for_touchable_area"
+            android:layout_height="@dimen/minimum_size_for_touchable_area"
             android:contentDescription="@string/common_send"
-            android:paddingBottom="@dimen/standard_padding"
-            android:paddingEnd="@dimen/standard_padding"
-            android:paddingLeft="@dimen/standard_padding"
-            android:paddingRight="@dimen/standard_padding"
-            android:paddingStart="@dimen/standard_padding"
-            android:paddingTop="@dimen/standard_padding"
-            android:src="@drawable/ic_send" />
+            app:cornerRadius="24dp"
+            app:icon="@drawable/ic_send"
+            app:iconTint="@color/grey_600"/>
+
     </LinearLayout>
 
     <androidx.swiperefreshlayout.widget.SwipeRefreshLayout