[Android] Improve the about layout for large screens

Nicolas Pomepuy git at videolan.org
Tue Jan 18 12:23:24 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Nov 17 07:50:18 2021 +0100| [5b4ba8fc527cc92b68769352879df8ca455737d7] | committer: Nicolas Pomepuy

Improve the about layout for large screens

> https://code.videolan.org/videolan/vlc-android/commit/5b4ba8fc527cc92b68769352879df8ca455737d7
---

 application/vlc-android/res/layout/about.xml | 32 +++++++++++++++++-----------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/application/vlc-android/res/layout/about.xml b/application/vlc-android/res/layout/about.xml
index 4c4d4e158..de4502c5c 100644
--- a/application/vlc-android/res/layout/about.xml
+++ b/application/vlc-android/res/layout/about.xml
@@ -49,9 +49,9 @@
                 android:textAlignment="center"
                 android:textColor="?attr/font_light"
                 app:layout_constraintEnd_toEndOf="parent"
-                app:layout_constraintHorizontal_bias="0.0"
                 app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/textView7" />
+                app:layout_constraintTop_toBottomOf="@+id/textView7"
+                app:layout_constraintWidth_max="600dp"/>
 
 
         <androidx.cardview.widget.CardView
@@ -68,7 +68,8 @@
                 app:cardCornerRadius="4dp"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/textView26">
+                app:layout_constraintTop_toBottomOf="@+id/textView26"
+                app:layout_constraintWidth_max="600dp">
 
             <LinearLayout
                     android:id="@+id/linearLayout"
@@ -106,7 +107,8 @@
                 app:cardCornerRadius="4dp"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/version_card">
+                app:layout_constraintTop_toBottomOf="@+id/version_card"
+                app:layout_constraintWidth_max="600dp">
 
             <androidx.constraintlayout.widget.ConstraintLayout
                     android:layout_width="match_parent"
@@ -173,7 +175,8 @@
                 app:cardElevation="0dp"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/donationsButton">
+                app:layout_constraintTop_toBottomOf="@+id/donationsButton"
+                app:layout_constraintWidth_max="600dp">
 
             <LinearLayout
                     android:layout_width="match_parent"
@@ -220,7 +223,8 @@
                 app:cardElevation="0dp"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/about_website_container">
+                app:layout_constraintTop_toBottomOf="@+id/about_website_container"
+                app:layout_constraintWidth_max="600dp">
 
             <LinearLayout
                     android:layout_width="match_parent"
@@ -267,7 +271,8 @@
                 app:cardElevation="0dp"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/about_forum_container">
+                app:layout_constraintTop_toBottomOf="@+id/about_forum_container"
+                app:layout_constraintWidth_max="600dp">
 
             <LinearLayout
                     android:layout_width="match_parent"
@@ -313,7 +318,8 @@
                 app:cardElevation="0dp"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/about_sources_container">
+                app:layout_constraintTop_toBottomOf="@+id/about_sources_container"
+                app:layout_constraintWidth_max="600dp">
 
             <LinearLayout
                     android:layout_width="match_parent"
@@ -359,7 +365,8 @@
                 app:cardElevation="0dp"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/about_libraries_container">
+                app:layout_constraintTop_toBottomOf="@+id/about_libraries_container"
+                app:layout_constraintWidth_max="600dp">
 
             <LinearLayout
                     android:layout_width="match_parent"
@@ -397,16 +404,17 @@
                 android:layout_marginStart="16dp"
                 android:layout_marginTop="24dp"
                 android:layout_marginEnd="16dp"
+                android:layout_marginBottom="8dp"
                 android:clickable="true"
                 android:focusable="true"
-                android:layout_marginBottom="8dp"
-                app:cardBackgroundColor="?attr/background_default_darker"
                 android:foreground="?android:attr/selectableItemBackground"
+                app:cardBackgroundColor="?attr/background_default_darker"
                 app:cardCornerRadius="4dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/about_authors_container">
+                app:layout_constraintTop_toBottomOf="@+id/about_authors_container"
+                app:layout_constraintWidth_max="600dp">
 
             <LinearLayout
                     android:layout_width="match_parent"



More information about the Android mailing list