fix paddings in contact and muc details

Daniel Gultsch created

Change summary

src/main/res/layout/activity_contact_details.xml | 25 ++++--------
src/main/res/layout/activity_muc_details.xml     | 36 +++++-------------
2 files changed, 18 insertions(+), 43 deletions(-)

Detailed changes

src/main/res/layout/activity_contact_details.xml 🔗

@@ -137,26 +137,22 @@
                     <LinearLayout
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:orientation="vertical">
+                        android:orientation="vertical"
+                        android:padding="@dimen/card_padding_regular">
 
                         <androidx.recyclerview.widget.RecyclerView
                             android:id="@+id/media"
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:layout_marginStart="-2dp"
-                            android:layout_marginEnd="-2dp"
-                            android:orientation="horizontal"
-                            android:paddingStart="@dimen/card_padding_regular"
-                            android:paddingTop="@dimen/card_padding_regular"
-                            android:paddingEnd="@dimen/card_padding_regular"
-                            android:paddingBottom="@dimen/card_padding_list" />
+                            android:layout_margin="-2dp"
+                            android:orientation="horizontal" />
 
                         <LinearLayout
                             android:layout_width="wrap_content"
                             android:layout_height="match_parent"
                             android:layout_gravity="end"
-                            android:orientation="horizontal"
-                            android:layout_margin="16dp">
+                            android:layout_marginTop="16dp"
+                            android:orientation="horizontal">
 
                             <Button
                                 android:id="@+id/show_media"
@@ -208,7 +204,8 @@
                             android:layout_width="wrap_content"
                             android:layout_height="match_parent"
                             android:layout_marginTop="8dp"
-                            android:orientation="horizontal">
+                            android:orientation="horizontal"
+                            android:padding="@dimen/card_padding_list">
 
 
                             <Button
@@ -216,9 +213,6 @@
                                 style="@style/Widget.Material3.Button.TextButton"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:minWidth="0dp"
-                                android:paddingLeft="16dp"
-                                android:paddingRight="16dp"
                                 android:text="@string/scan_qr_code" />
 
                             <Button
@@ -226,9 +220,6 @@
                                 style="@style/Widget.Material3.Button.TextButton"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:minWidth="0dp"
-                                android:paddingLeft="16dp"
-                                android:paddingRight="16dp"
                                 android:text="@string/show_inactive_devices" />
                         </LinearLayout>
                     </LinearLayout>

src/main/res/layout/activity_muc_details.xml 🔗

@@ -219,15 +219,13 @@
                     <LinearLayout
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:orientation="vertical">
+                        android:orientation="vertical"
+                        android:padding="@dimen/card_padding_regular">
 
                         <TextView
                             android:id="@+id/no_users_hints"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:paddingStart="@dimen/card_padding_regular"
-                            android:paddingTop="@dimen/card_padding_regular"
-                            android:paddingEnd="@dimen/card_padding_regular"
                             android:text="@string/no_users_hint_channel"
                             android:textAppearance="?textAppearanceBodyMedium"
                             android:textColor="?colorOnSurfaceVariant" />
@@ -236,18 +234,14 @@
                             android:id="@+id/users"
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:layout_marginStart="-2dp"
-                            android:layout_marginEnd="-2dp"
-                            android:orientation="horizontal"
-                            android:paddingStart="@dimen/card_padding_regular"
-                            android:paddingTop="@dimen/card_padding_regular"
-                            android:paddingEnd="@dimen/card_padding_regular"
-                            android:paddingBottom="@dimen/card_padding_list" />
+                            android:layout_margin="-2dp"
+                            android:orientation="horizontal" />
 
                         <LinearLayout
                             android:layout_width="wrap_content"
                             android:layout_height="match_parent"
                             android:layout_gravity="end"
+                            android:layout_marginTop="16dp"
                             android:orientation="horizontal">
 
                             <Button
@@ -255,9 +249,6 @@
                                 style="@style/Widget.Material3.Button.TextButton"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:minWidth="0dp"
-                                android:paddingLeft="16dp"
-                                android:paddingRight="16dp"
                                 android:text="@string/invite" />
 
                             <Button
@@ -265,9 +256,6 @@
                                 style="@style/Widget.Material3.Button.TextButton"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:minWidth="0dp"
-                                android:paddingLeft="16dp"
-                                android:paddingRight="16dp"
                                 tools:text="View n Participants" />
                         </LinearLayout>
                     </LinearLayout>
@@ -373,25 +361,21 @@
                     <LinearLayout
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:orientation="vertical">
+                        android:orientation="vertical"
+                        android:padding="@dimen/card_padding_regular">
 
                         <androidx.recyclerview.widget.RecyclerView
                             android:id="@+id/media"
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:layout_marginStart="-2dp"
-                            android:layout_marginEnd="-2dp"
-                            android:orientation="horizontal"
-                            android:paddingStart="@dimen/card_padding_regular"
-                            android:paddingTop="@dimen/card_padding_regular"
-                            android:paddingEnd="@dimen/card_padding_regular"
-                            android:paddingBottom="@dimen/card_padding_list" />
+                            android:layout_margin="-2dp"
+                            android:orientation="horizontal" />
 
                         <LinearLayout
                             android:layout_width="wrap_content"
                             android:layout_height="match_parent"
                             android:layout_gravity="end"
-                            android:layout_margin="16dp"
+                            android:layout_marginTop="16dp"
                             android:orientation="horizontal">
 
                             <Button