Преглед изворни кода

align remaining bottom sheets with clickable background animation

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger пре 3 година
родитељ
комит
4c64686abc

+ 13 - 4
app/src/main/res/layout/dialog_attachment.xml

@@ -3,7 +3,7 @@
   ~
   ~ @author Marcel Hibbe
   ~ @author Andy Scherzinger
-  ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
+  ~ Copyright (C) 2021-2022 Andy Scherzinger <info@andy-scherzinger.de>
   ~ Copyright (C) 2021 Marcel Hibbe <marcel.hibbe@nextcloud.com>
   ~
   ~ This program is free software: you can redistribute it and/or modify
@@ -19,15 +19,12 @@
   ~ You should have received a copy of the GNU General Public License
   ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   -->
-
 <LinearLayout 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_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical"
-    android:paddingStart="@dimen/standard_padding"
-    android:paddingEnd="@dimen/standard_padding"
     android:paddingBottom="@dimen/standard_half_padding">
 
     <TextView
@@ -35,6 +32,8 @@
         android:layout_width="wrap_content"
         android:layout_height="@dimen/bottom_sheet_item_height"
         android:gravity="start|center_vertical"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         android:text="@string/nc_add_file"
         android:textAlignment="viewStart"
         android:textColor="@color/medium_emphasis_text"
@@ -47,6 +46,8 @@
         android:background="?android:attr/selectableItemBackground"
         android:gravity="center_vertical"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         tools:ignore="UseCompoundDrawables">
 
         <ImageView
@@ -78,6 +79,8 @@
         android:background="?android:attr/selectableItemBackground"
         android:gravity="center_vertical"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         tools:ignore="UseCompoundDrawables">
 
         <ImageView
@@ -109,6 +112,8 @@
         android:background="?android:attr/selectableItemBackground"
         android:gravity="center_vertical"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         tools:ignore="UseCompoundDrawables">
 
         <ImageView
@@ -140,6 +145,8 @@
         android:background="?android:attr/selectableItemBackground"
         android:gravity="center_vertical"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         tools:ignore="UseCompoundDrawables">
 
         <ImageView
@@ -171,6 +178,8 @@
         android:background="?android:attr/selectableItemBackground"
         android:gravity="center_vertical"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         tools:ignore="UseCompoundDrawables">
 
         <ImageView

+ 10 - 2
app/src/main/res/layout/dialog_audio_output.xml

@@ -25,8 +25,6 @@
     android:layout_height="wrap_content"
     android:background="@color/bg_call_screen_dialog"
     android:orientation="vertical"
-    android:paddingStart="@dimen/standard_padding"
-    android:paddingEnd="@dimen/standard_padding"
     android:paddingBottom="@dimen/standard_half_padding">
 
     <TextView
@@ -34,6 +32,8 @@
         android:layout_width="wrap_content"
         android:layout_height="@dimen/bottom_sheet_item_height"
         android:gravity="start|center_vertical"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         android:text="@string/audio_output_dialog_headline"
         android:textColor="@color/medium_emphasis_text_dark_background"
         android:textSize="@dimen/bottom_sheet_text_size" />
@@ -45,6 +45,8 @@
         android:background="?android:attr/selectableItemBackground"
         android:gravity="center_vertical"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         tools:ignore="UseCompoundDrawables">
 
         <ImageView
@@ -76,6 +78,8 @@
         android:background="?android:attr/selectableItemBackground"
         android:gravity="center_vertical"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         tools:ignore="UseCompoundDrawables">
 
         <ImageView
@@ -107,6 +111,8 @@
         android:background="?android:attr/selectableItemBackground"
         android:gravity="center_vertical"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         tools:ignore="UseCompoundDrawables">
 
         <ImageView
@@ -138,6 +144,8 @@
         android:background="?android:attr/selectableItemBackground"
         android:gravity="center_vertical"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_padding"
         tools:ignore="UseCompoundDrawables">
 
         <ImageView

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

@@ -89,7 +89,8 @@
         app:layout_constraintBottom_toTopOf="@+id/add_account"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/separator_line" />
+        app:layout_constraintTop_toBottomOf="@+id/separator_line"
+        tools:listitem="@layout/account_item" />
 
     <com.google.android.material.button.MaterialButton
         android:id="@+id/add_account"

+ 38 - 2
app/src/main/res/layout/dialog_conversation_operations.xml

@@ -26,8 +26,6 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical"
-    android:paddingStart="@dimen/standard_padding"
-    android:paddingEnd="@dimen/standard_padding"
     android:paddingBottom="@dimen/standard_half_padding">
 
     <LinearLayout
@@ -42,6 +40,8 @@
             android:layout_width="wrap_content"
             android:layout_height="@dimen/bottom_sheet_item_height"
             android:gravity="start|center_vertical"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             android:textColor="@color/medium_emphasis_text"
             android:textSize="@dimen/bottom_sheet_text_size"
             tools:text="conversation name" />
@@ -50,8 +50,11 @@
             android:id="@+id/conversation_operation_remove_favorite"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -77,8 +80,11 @@
             android:id="@+id/conversation_operation_add_favorite"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -104,8 +110,11 @@
             android:id="@+id/conversation_operation_mark_as_read"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -131,8 +140,11 @@
             android:id="@+id/conversation_operation_rename"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -158,8 +170,11 @@
             android:id="@+id/conversation_operation_make_public"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -185,8 +200,11 @@
             android:id="@+id/conversation_operation_change_password"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -212,8 +230,11 @@
             android:id="@+id/conversation_operation_clear_password"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -239,8 +260,11 @@
             android:id="@+id/conversation_operation_set_password"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -266,8 +290,11 @@
             android:id="@+id/conversation_operation_delete"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -293,8 +320,11 @@
             android:id="@+id/conversation_operation_share_link"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -320,8 +350,11 @@
             android:id="@+id/conversation_operation_make_private"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView
@@ -347,8 +380,11 @@
             android:id="@+id/conversation_operation_leave"
             android:layout_width="match_parent"
             android:layout_height="@dimen/bottom_sheet_item_height"
+            android:background="?android:attr/selectableItemBackground"
             android:gravity="center_vertical"
             android:orientation="horizontal"
+            android:paddingStart="@dimen/standard_padding"
+            android:paddingEnd="@dimen/standard_padding"
             tools:ignore="UseCompoundDrawables">
 
             <ImageView

+ 13 - 4
app/src/main/res/layout/dialog_scope.xml

@@ -4,7 +4,7 @@
   ~ @author Tobias Kaminsky
   ~ @author Andy Scherzinger
   ~ Copyright (C) 2021 Tobias Kaminsky <tobias.kaminsky@nextcloud.com>
-  ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
+  ~ Copyright (C) 2021-2022 Andy Scherzinger <info@andy-scherzinger.de>
   ~
   ~ This program is free software: you can redistribute it and/or modify
   ~ it under the terms of the GNU General Public License as published by
@@ -19,23 +19,23 @@
   ~ You should have received a copy of the GNU General Public License
   ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   -->
-
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical"
-    android:paddingStart="@dimen/standard_padding"
     android:paddingTop="@dimen/standard_half_padding"
-    android:paddingEnd="@dimen/standard_padding"
     android:paddingBottom="@dimen/standard_half_padding">
 
     <LinearLayout
         android:id="@+id/scope_private"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:background="?android:attr/selectableItemBackground"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
         android:paddingTop="@dimen/standard_half_padding"
+        android:paddingEnd="@dimen/standard_padding"
         android:paddingBottom="@dimen/standard_half_padding">
 
         <ImageView
@@ -77,8 +77,11 @@
         android:id="@+id/scope_local"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:background="?android:attr/selectableItemBackground"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
         android:paddingTop="@dimen/standard_half_padding"
+        android:paddingEnd="@dimen/standard_padding"
         android:paddingBottom="@dimen/standard_half_padding">
 
         <ImageView
@@ -120,8 +123,11 @@
         android:id="@+id/scope_federated"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:background="?android:attr/selectableItemBackground"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
         android:paddingTop="@dimen/standard_half_padding"
+        android:paddingEnd="@dimen/standard_padding"
         android:paddingBottom="@dimen/standard_half_padding">
 
         <ImageView
@@ -163,8 +169,11 @@
         android:id="@+id/scope_published"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:background="?android:attr/selectableItemBackground"
         android:orientation="horizontal"
+        android:paddingStart="@dimen/standard_padding"
         android:paddingTop="@dimen/standard_half_padding"
+        android:paddingEnd="@dimen/standard_padding"
         android:paddingBottom="@dimen/standard_half_padding">
 
         <ImageView

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

@@ -22,7 +22,8 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="@dimen/item_height">
+    android:layout_height="@dimen/item_height"
+    android:background="?android:attr/selectableItemBackground">
 
     <com.facebook.drawee.view.SimpleDraweeView
         android:id="@+id/avatar"