Răsfoiți Sursa

chore: This is a cheat. I removed the drag handle icon and replaced it with an equal sign just to reduce app size

beautusg 7 ani în urmă
părinte
comite
97fd8f5a9d

+ 1 - 1
app/src/main/java/com/sduduzog/slimlauncher/adapters/CustomAppsAdapter.kt

@@ -82,7 +82,7 @@ class CustomAppsAdapter(private val listener: OnShitDoneToAppsListener) : Recycl
     }
     }
 
 
     inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
     inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
-        val dragHandle: ImageView = itemView.findViewById(R.id.ca_list_item_drag_handle)
+        val dragHandle: TextView = itemView.findViewById(R.id.ca_list_item_drag_handle)
         val appName: TextView = itemView.findViewById(R.id.ca_list_item_app_name)
         val appName: TextView = itemView.findViewById(R.id.ca_list_item_app_name)
         val menuIcon: ImageView = itemView.findViewById(R.id.ca_list_item_more_icon)
         val menuIcon: ImageView = itemView.findViewById(R.id.ca_list_item_more_icon)
 
 

+ 0 - 9
app/src/main/res/drawable/ic_drag_handle.xml

@@ -1,9 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="24dp"
-    android:height="24dp"
-    android:viewportWidth="24.0"
-    android:viewportHeight="24.0">
-    <path
-        android:fillColor="?attr/colorAccent"
-        android:pathData="M20,9H4v2h16V9zM4,15h16v-2H4v2z" />
-</vector>

+ 2 - 1
app/src/main/res/layout/customise_apps_fragment.xml

@@ -23,7 +23,7 @@
     <androidx.recyclerview.widget.RecyclerView
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/customise_apps_fragment_list"
         android:id="@+id/customise_apps_fragment_list"
         android:layout_width="0dp"
         android:layout_width="0dp"
-        android:layout_height="wrap_content"
+        android:layout_height="0dp"
         android:layout_marginStart="8dp"
         android:layout_marginStart="8dp"
         android:layout_marginLeft="8dp"
         android:layout_marginLeft="8dp"
         android:layout_marginTop="8dp"
         android:layout_marginTop="8dp"
@@ -33,6 +33,7 @@
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/textView6"
         app:layout_constraintTop_toBottomOf="@+id/textView6"
+        app:layout_constraintBottom_toBottomOf="parent"
         tools:itemCount="5"
         tools:itemCount="5"
         tools:listitem="@layout/customise_apps_fragment_list_item" />
         tools:listitem="@layout/customise_apps_fragment_list_item" />
 
 

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

@@ -7,17 +7,22 @@
     android:layout_marginTop="6dp"
     android:layout_marginTop="6dp"
     android:layout_marginBottom="6dp">
     android:layout_marginBottom="6dp">
 
 
-    <ImageView
+    <TextView
         android:id="@+id/ca_list_item_drag_handle"
         android:id="@+id/ca_list_item_drag_handle"
         android:layout_width="wrap_content"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
         android:padding="8dp"
         android:padding="8dp"
+        android:paddingStart="12dp"
+        android:paddingLeft="12dp"
+        android:paddingEnd="12dp"
+        android:paddingRight="12dp"
+        android:text="="
+        android:textAppearance="@style/TextAppearance.AppCompat"
+        android:textSize="24sp"
         app:layout_constraintBottom_toBottomOf="@+id/ca_list_item_app_name"
         app:layout_constraintBottom_toBottomOf="@+id/ca_list_item_app_name"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="@+id/ca_list_item_app_name"
         app:layout_constraintTop_toTopOf="@+id/ca_list_item_app_name"
-        app:srcCompat="@drawable/ic_drag_handle"
-        tools:ignore="ContentDescription" />
+        tools:ignore="HardcodedText" />
 
 
     <TextView
     <TextView
         android:id="@+id/ca_list_item_app_name"
         android:id="@+id/ca_list_item_app_name"
@@ -29,7 +34,7 @@
         android:maxLines="1"
         android:maxLines="1"
         android:singleLine="true"
         android:singleLine="true"
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_24ssp"
+        android:textSize="24sp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toStartOf="@+id/ca_list_item_more_icon"
         app:layout_constraintEnd_toStartOf="@+id/ca_list_item_more_icon"
         app:layout_constraintStart_toEndOf="@+id/ca_list_item_drag_handle"
         app:layout_constraintStart_toEndOf="@+id/ca_list_item_drag_handle"
@@ -39,7 +44,6 @@
         android:id="@+id/ca_list_item_more_icon"
         android:id="@+id/ca_list_item_more_icon"
         android:layout_width="wrap_content"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
         android:padding="8dp"
         android:padding="8dp"
         app:layout_constraintBottom_toBottomOf="@+id/ca_list_item_app_name"
         app:layout_constraintBottom_toBottomOf="@+id/ca_list_item_app_name"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintEnd_toEndOf="parent"