소스 검색

feat(apps): full-width clickability (#178)

Klaus-Hendrik Wolf 2 년 전
부모
커밋
ca7513ddcb

+ 1 - 1
app/src/main/res/layout/add_app_fragment_list_item.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/aa_list_item_app_name"
-    android:layout_width="wrap_content"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:padding="6dp"
     android:stateListAnimator="@xml/animate_scale"

+ 5 - 9
app/src/main/res/layout/customise_apps_fragment.xml

@@ -5,13 +5,17 @@
     android:id="@+id/customise_apps_fragment"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:layout_marginStart="8dp"
+    android:layout_marginLeft="8dp"
+    android:layout_marginEnd="8dp"
+    android:layout_marginRight="8dp"
     tools:context=".ui.options.CustomiseAppsFragment">
 
     <TextView
         android:id="@+id/textView6"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_16sdp"
+        android:layout_marginStart="@dimen/_8sdp"
         android:textColor="?headerTextColor"
         android:layout_marginTop="@dimen/_8sdp"
         android:text="@string/options_fragment_customise_apps"
@@ -24,11 +28,7 @@
         android:id="@+id/customise_apps_fragment_list"
         android:layout_width="0dp"
         android:layout_height="0dp"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
         android:layout_marginTop="8dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
         app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
@@ -41,8 +41,6 @@
         android:id="@+id/customise_apps_fragment_add"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
         android:layout_marginBottom="8dp"
         android:padding="@dimen/_12sdp"
         android:text="@string/customise_apps_fragment_add"
@@ -55,8 +53,6 @@
         android:id="@+id/customise_apps_fragment_remove_all"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
         android:layout_marginBottom="8dp"
         android:text="@string/customise_apps_fragment_remove_all"
         android:padding="@dimen/_12sdp"

+ 4 - 8
app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml

@@ -5,16 +5,16 @@
     android:id="@+id/customize_app_drawer_fragment"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:layout_marginStart="8dp"
+    android:layout_marginLeft="8dp"
+    android:layout_marginEnd="8dp"
+    android:layout_marginRight="8dp"
     tools:context=".ui.options.CustomizeAppDrawerFragment">
 
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/customize_app_drawer_fragment_app_list"
         android:layout_width="0dp"
         android:layout_height="0dp"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
         app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
@@ -27,11 +27,7 @@
         style="?android:attr/progressBarStyle"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
         android:layout_marginTop="8dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"

+ 6 - 10
app/src/main/res/layout/customize_app_drawer_fragment.xml

@@ -5,17 +5,17 @@
     android:id="@+id/customize_app_drawer_fragment"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:layout_marginStart="@dimen/_16sdp"
+    android:layout_marginLeft="@dimen/_16sdp"
+    android:layout_marginEnd="@dimen/_16sdp"
+    android:layout_marginRight="@dimen/_16sdp"
     tools:context=".ui.options.CustomizeAppDrawerFragment">
 
     <TextView
         android:id="@+id/customize_app_drawer_fragment_visible_apps"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_16sdp"
-        android:layout_marginLeft="@dimen/_16sdp"
         android:layout_marginTop="32dp"
-        android:layout_marginEnd="@dimen/_16sdp"
-        android:layout_marginRight="@dimen/_16sdp"
         android:textColor="?headerTextColor"
         android:text="@string/customize_app_drawer_fragment_visible_apps"
         android:textAppearance="@style/TextAppearance.AppCompat"
@@ -25,7 +25,7 @@
 
     <TextView
         android:id="@+id/customize_app_drawer_fragment_search_options"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="32dp"
         android:layout_marginEnd="@dimen/_16sdp"
@@ -39,12 +39,8 @@
         android:id="@+id/customize_app_drawer_fragment_show_headings_switch"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_16sdp"
-        android:layout_marginLeft="@dimen/_16sdp"
         android:layout_marginTop="32dp"
         android:layout_marginEnd="@dimen/_16sdp"
-        android:layout_marginRight="@dimen/_16sdp"
-        android:layout_marginBottom="32dp"
         android:text="@string/customize_app_drawer_fragment_show_headings"
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/font_size_customize_options"

+ 5 - 9
app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml

@@ -3,13 +3,17 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/customize_app_drawer_fragment_search_field_options"
+    android:layout_marginStart="@dimen/_16sdp"
+    android:layout_marginLeft="@dimen/_16sdp"
+    android:layout_marginEnd="@dimen/_16sdp"
+    android:layout_marginRight="@dimen/_16sdp"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context=".ui.options.CustomizeSearchFieldFragment">
 
     <TextView
         android:id="@+id/customize_app_drawer_fragment_search_field_position"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="32dp"
         android:text="@string/customize_app_drawer_fragment_search_bar_position"
@@ -22,11 +26,7 @@
         android:id="@+id/customize_app_drawer_fragment_show_search_field_switch"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_16sdp"
-        android:layout_marginLeft="@dimen/_16sdp"
         android:layout_marginTop="32dp"
-        android:layout_marginEnd="@dimen/_16sdp"
-        android:layout_marginRight="@dimen/_16sdp"
         android:text="@string/customize_app_drawer_fragment_show_search_bar"
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/_20ssp"
@@ -37,11 +37,7 @@
         android:id="@+id/customize_app_drawer_open_keyboard_switch"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_16sdp"
-        android:layout_marginLeft="@dimen/_16sdp"
         android:layout_marginTop="32dp"
-        android:layout_marginEnd="@dimen/_16sdp"
-        android:layout_marginRight="@dimen/_16sdp"
         android:layout_marginBottom="32dp"
         android:text="@string/customize_app_drawer_fragment_open_keyboard"
         android:textAppearance="@style/TextAppearance.AppCompat"

+ 4 - 8
app/src/main/res/layout/home_fragment_content.xml

@@ -2,6 +2,10 @@
 <merge 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:layout_marginStart="8dp"
+    android:layout_marginLeft="8dp"
+    android:layout_marginEnd="8dp"
+    android:layout_marginRight="8dp"
     tools:showIn="@layout/home_fragment_default">
 
 
@@ -9,11 +13,7 @@
         android:id="@+id/app_drawer_edit_text"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
         android:layout_marginTop="32dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
         android:ems="10"
         android:hint="@string/add_apps_fragment_search_apps"
         android:imeOptions="actionDone"
@@ -83,10 +83,6 @@
         android:id="@+id/app_drawer_fragment_list"
         android:layout_width="0dp"
         android:layout_height="0dp"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
         app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
         tools:listitem="@layout/add_app_fragment_list_item" />
 </merge>

+ 11 - 12
app/src/main/res/layout/options_fragment.xml

@@ -11,13 +11,14 @@
         android:id="@+id/options_fragment"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_marginStart="24dp"
+        android:layout_marginEnd="24dp"
         tools:context=".ui.options.OptionsFragment">
 
         <TextView
             android:id="@+id/textView5"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/_16sdp"
             android:layout_marginTop="@dimen/_8sdp"
             android:stateListAnimator="@xml/animate_scale"
             android:text="@string/main_fragment_options"
@@ -29,9 +30,8 @@
 
         <TextView
             android:id="@+id/options_fragment_device_settings"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginStart="24dp"
             android:layout_marginTop="32dp"
             android:text="@string/options_fragment_device_settings"
             android:textAppearance="@style/TextAppearance.AppCompat"
@@ -44,7 +44,7 @@
 
         <TextView
             android:id="@+id/options_fragment_change_theme"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="32dp"
             android:stateListAnimator="@xml/animate_scale"
@@ -57,7 +57,7 @@
 
         <TextView
             android:id="@+id/options_fragment_choose_time_format"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="32dp"
             android:stateListAnimator="@xml/animate_scale"
@@ -70,7 +70,7 @@
 
         <TextView
             android:id="@+id/options_fragment_toggle_status_bar"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="32dp"
             android:stateListAnimator="@xml/animate_scale"
@@ -83,7 +83,7 @@
 
         <TextView
             android:id="@+id/options_fragment_customise_apps"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="32dp"
             android:layout_marginBottom="32dp"
@@ -97,7 +97,7 @@
 
         <TextView
             android:id="@+id/options_fragment_choose_alignment"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:stateListAnimator="@xml/animate_scale"
             android:text="@string/options_fragment_choose_alignment"
@@ -109,7 +109,7 @@
 
         <TextView
             android:id="@+id/options_fragment_customize_quick_buttons"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="32dp"
             android:layout_marginBottom="32dp"
@@ -123,7 +123,7 @@
 
         <TextView
             android:id="@+id/options_fragment_customize_app_drawer"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="32dp"
             android:layout_marginBottom="32dp"
@@ -143,7 +143,6 @@
             android:text="@string/customize_app_drawer_fragment_auto_theme_wallpaper_text"
             android:textAppearance="@style/TextAppearance.AppCompat"
             android:textSize="@dimen/font_size_customize_options"
-            android:layout_marginStart="@dimen/_16sdp"
             app:layout_constraintStart_toStartOf="@+id/options_fragment_customize_app_drawer"
             app:layout_constraintTop_toBottomOf="@id/options_fragment_customize_app_drawer" />
     </androidx.constraintlayout.widget.ConstraintLayout>