show buttons in two lines, they get squeezed when button text is too long
authorBartek Przybylski <bart.p.pl@gmail.com>
Sat, 21 Jul 2012 20:31:18 +0000 (22:31 +0200)
committerBartek Przybylski <bart.p.pl@gmail.com>
Sat, 21 Jul 2012 20:31:18 +0000 (22:31 +0200)
res/layout/file_details_fragment.xml

index 6199e4a..3903677 100644 (file)
                     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"