[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] layout changes for a modern, cleaner (purple!) look



commit 70d6203fdbdf3375fb9fec602bfb7b150d580285
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date:   Sun Feb 15 01:22:15 2015 -0500

    layout changes for a modern, cleaner (purple!) look
---
 res/drawable/button.xml     |   37 +++++++++++++++++++++++++++++++++++++
 res/drawable/button_off.xml |   37 +++++++++++++++++++++++++++++++++++++
 res/drawable/toggle.xml     |    8 ++++++++
 res/layout/layout_main.xml  |   14 +++++++++++---
 res/values/colors.xml       |    5 +++--
 5 files changed, 96 insertions(+), 5 deletions(-)

diff --git a/res/drawable/button.xml b/res/drawable/button.xml
new file mode 100644
index 0000000..4bff579
--- /dev/null
+++ b/res/drawable/button.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android";>
+  <item android:state_pressed="true" >
+    <shape>
+      <solid
+          android:color="@color/panel_background" />
+      <stroke
+          android:width="1dp"
+          android:color="#ffffff" />
+      <corners
+          android:radius="6dp" />
+      <padding
+          android:left="10dp"
+          android:top="10dp"
+          android:right="10dp"
+          android:bottom="10dp" />
+    </shape>
+  </item>
+  <item>
+    <shape>
+      <gradient
+          android:startColor="@color/panel_background_dark"
+          android:endColor="@color/panel_background_main"
+          android:angle="270" />
+      <stroke
+          android:width="2dp"
+          android:color="#aaaaaa" />
+      <corners
+          android:radius="6dp" />
+      <padding
+          android:left="10dp"
+          android:top="10dp"
+          android:right="10dp"
+          android:bottom="10dp" />
+    </shape>
+  </item>
+</selector>
\ No newline at end of file
diff --git a/res/drawable/button_off.xml b/res/drawable/button_off.xml
new file mode 100644
index 0000000..18da286
--- /dev/null
+++ b/res/drawable/button_off.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android";>
+  <item android:state_pressed="true" >
+    <shape>
+      <solid
+          android:color="@color/panel_background" />
+      <stroke
+          android:width="1dp"
+          android:color="#ffffff" />
+      <corners
+          android:radius="6dp" />
+      <padding
+          android:left="10dp"
+          android:top="10dp"
+          android:right="10dp"
+          android:bottom="10dp" />
+    </shape>
+  </item>
+  <item>
+    <shape>
+      <gradient
+          android:startColor="@color/panel_background_dark"
+          android:endColor="@color/panel_background_main"
+          android:angle="270" />
+      <stroke
+          android:width="2dp"
+          android:color="#555555" />
+      <corners
+          android:radius="6dp" />
+      <padding
+          android:left="10dp"
+          android:top="10dp"
+          android:right="10dp"
+          android:bottom="10dp" />
+    </shape>
+  </item>
+</selector>
\ No newline at end of file
diff --git a/res/drawable/toggle.xml b/res/drawable/toggle.xml
new file mode 100644
index 0000000..6b29ea1
--- /dev/null
+++ b/res/drawable/toggle.xml
@@ -0,0 +1,8 @@
+<selector xmlns:android="http://schemas.android.com/apk/res/android";>
+    <item
+        android:state_checked="false"
+        android:drawable="@drawable/button_off" />
+    <item
+        android:state_checked="true"
+        android:drawable="@drawable/button" />
+</selector>
\ No newline at end of file
diff --git a/res/layout/layout_main.xml b/res/layout/layout_main.xml
index 5f48818..5ccc187 100644
--- a/res/layout/layout_main.xml
+++ b/res/layout/layout_main.xml
@@ -127,6 +127,8 @@
 	    	android:layout_width="match_parent"
 		android:layout_height="0dp"
 		android:layout_weight="1"
+		
+          android:background="@color/panel_background_main"
 	    >
        <org.torproject.android.ui.ImageProgressView
 		android:id="@+id/imgStatus"
@@ -143,11 +145,10 @@
 			android:textColor="@android:color/white"
 			android:layout_width="wrap_content"
 			android:layout_height="wrap_content"
-			android:textSize="14sp"
+			android:textSize="16sp"
 			android:gravity="center_vertical"
 			android:fontFamily="sans-serif-light"
 			android:text=""
-			android:background="#aa333333"
 					android:layout_gravity="center_horizontal|bottom"
 			android:layout_margin="10dp"
 			
@@ -168,6 +169,9 @@
 			    android:layout_width="wrap_content"
 			    android:layout_height="wrap_content"
 			    android:text="@string/menu_verify_browser"
+			    
+          		android:background="@drawable/button"
+          		android:layout_margin="3dp"
 			     />
 	
 			<ToggleButton
@@ -175,7 +179,9 @@
 			    android:layout_width="wrap_content"
 			    android:layout_height="wrap_content"
 			    android:textOff="@string/bridges"
-			    android:textOn="@string/bridges"			    
+			    android:textOn="@string/bridges"	
+			    android:background="@drawable/toggle"
+          		    android:layout_margin="3dp"
 			    />
 			
 			<ToggleButton
@@ -184,6 +190,8 @@
 			    android:layout_height="wrap_content"
 			    android:textOff="@string/menu_vpn"
 			    android:textOn="@string/menu_vpn"			    
+				android:background="@drawable/toggle"
+          android:layout_margin="3dp"
 			    />
 			 
 		    </LinearLayout>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 3454a7b..8a93834 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -1,6 +1,7 @@
 
     <resources>
-        <color name="panel_background">#460072</color>
-        <color name="panel_background_dark">#240020</color>
+        <color name="panel_background">#55460072</color>
+        <color name="panel_background_dark">#aa460072</color>
+        <color name="panel_background_main">#460072</color>
         
     </resources>



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits