Эх сурвалжийг харах

show buttons in two lines, they get squeezed when button text is too long

Bartek Przybylski 13 жил өмнө
parent
commit
3c0e72c400

+ 40 - 26
res/layout/file_details_fragment.xml

@@ -178,35 +178,49 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_below="@id/fdPreview"
-                    android:gravity="center_horizontal" >
+                    android:orientation="vertical" >
 
-                    <Button
-                        android:id="@+id/fdRemoveBtn"
-                        android:layout_width="wrap_content"
+                    <LinearLayout
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:layout_marginTop="12dp"
-                        android:text="@string/common_remove" />
-
-                    <Button
-                        android:id="@+id/fdOpenBtn"
-                        android:layout_width="wrap_content"
+                        android:gravity="center_horizontal" >
+
+                        <Button
+                            android:id="@+id/fdRemoveBtn"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="12dp"
+                            android:text="@string/common_remove" />
+
+                        <Button
+                            android:id="@+id/fdOpenBtn"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="12dp"
+                            android:text="@string/filedetails_open" />
+
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:layout_marginTop="12dp"
-                        android:text="@string/filedetails_open" />
-
-                    <Button
-                        android:id="@+id/fdDownloadBtn"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="12dp"
-                        android:text="@string/filedetails_download" />
-
-                    <Button
-                        android:id="@+id/fdRenameBtn"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="12dp"
-                        android:text="@string/common_rename" />
+                        android:gravity="center_horizontal">
+
+                        <Button
+                            android:id="@+id/fdDownloadBtn"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="12dp"
+                            android:text="@string/filedetails_download" />
+
+                        <Button
+                            android:id="@+id/fdRenameBtn"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="12dp"
+                            android:text="@string/common_rename" />
+
+                    </LinearLayout>
 <!-- 
                     <Button
                         android:id="@+id/fdShareBtn"