[tor-commits] [orbot/master] make buttons not resize weirdly with long strings

n8fr8 at torproject.org n8fr8 at torproject.org
Mon Apr 13 12:38:26 UTC 2015


commit 3c6f173edeef4ece6383bc53ec18299fb08e3239
Author: Nathan Freitas <nathan at freitas.net>
Date:   Sat Apr 11 21:19:42 2015 -0400

    make buttons not resize weirdly with long strings
---
 res/layout/layout_main.xml |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/res/layout/layout_main.xml b/res/layout/layout_main.xml
index a3f0a97..1b46e55 100644
--- a/res/layout/layout_main.xml
+++ b/res/layout/layout_main.xml
@@ -172,28 +172,34 @@
 			    
           		android:background="@drawable/button"
           		android:layout_margin="3dp"
+          		 android:ellipsize="end"
+          android:singleLine="true"
 			     />
 	
 			
 			<ToggleButton
 			    android:id="@+id/btnVPN"
-			    android:layout_width="wrap_content"
+			    android:layout_width="80dp"
 			    android:layout_height="wrap_content"
 			    android:textOff="@string/menu_vpn"
 			    android:textOn="@string/menu_vpn"			    
 				android:background="@drawable/toggle"
           android:layout_margin="3dp"
+          android:ellipsize="end"
+          android:singleLine="true"
 			    />
 			
 			
 			<ToggleButton
 			    android:id="@+id/btnBridges"
-			    android:layout_width="wrap_content"
+			    android:layout_width="80dp"
 			    android:layout_height="wrap_content"
 			    android:textOff="@string/bridges"
 			    android:textOn="@string/bridges"	
 			    android:background="@drawable/toggle"
           		    android:layout_margin="3dp"
+          		     android:ellipsize="end"
+          android:singleLine="true"
 			    />
 			 
 		    </LinearLayout>





More information about the tor-commits mailing list