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

[tor-commits] [orbot/master] small fixes for the wizard with new UI



commit bab67b7c131915273df1987b237407a2bec2b05d
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date:   Tue Apr 8 11:36:59 2014 -0400

    small fixes for the wizard with new UI
---
 res/layout/layout_wizard_locale.xml                |    2 +-
 res/layout/layout_wizard_root.xml                  |   20 +-----------
 res/layout/layout_wizard_tips.xml                  |   33 +-------------------
 res/layout/scrollingtext_buttons_view.xml          |   33 --------------------
 .../android/wizard/ConfigureTransProxy.java        |    4 +--
 src/org/torproject/android/wizard/LotsaText.java   |   14 +++------
 src/org/torproject/android/wizard/Permissions.java |   12 ++-----
 .../torproject/android/wizard/TipsAndTricks.java   |   15 +++------
 8 files changed, 17 insertions(+), 116 deletions(-)

diff --git a/res/layout/layout_wizard_locale.xml b/res/layout/layout_wizard_locale.xml
index 1918f56..ae3aecb 100644
--- a/res/layout/layout_wizard_locale.xml
+++ b/res/layout/layout_wizard_locale.xml
@@ -14,7 +14,7 @@
         	android:textColor="#FFFFFF"
         	android:layout_alignParentTop="true"
        	 	android:layout_height="wrap_content" 
-        	android:id="@+id/WizardTextTitle" 
+        	android:id="@+id/WizardLocaleTitle" 
         	android:layout_width="wrap_content" 
         	android:fadingEdge="vertical" 
         	android:text="@string/wizard_locale_title" 
diff --git a/res/layout/layout_wizard_root.xml b/res/layout/layout_wizard_root.xml
index 7e230a6..cdda4f4 100644
--- a/res/layout/layout_wizard_root.xml
+++ b/res/layout/layout_wizard_root.xml
@@ -4,25 +4,7 @@
     android:orientation="vertical"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">
-            
-<RelativeLayout 
-	android:layout_width="fill_parent" 
-	android:layout_height="wrap_content" 
-	android:id="@+id/relativeLayout1" 
-	android:layout_gravity="center_horizontal"
-	android:background="#000000">
-         <TextView android:textSize="10pt" 
-        	android:textColor="#FFFFFF"
-        	android:layout_alignParentTop="true"
-       	 	android:layout_height="wrap_content" 
-        	android:id="@+id/WizardTextTitle" 
-        	android:layout_width="wrap_content" 
-        	android:fadingEdge="vertical" 
-        	android:text="TITLE" 
-        	android:singleLine="true" 
-          	android:padding="20px" android:layout_centerInParent="true"> 
-        </TextView>
-    </RelativeLayout>    
+              
 <TableLayout android:id="@+id/TableLayout01" android:stretchColumns="*" android:layout_height="fill_parent" android:layout_width="wrap_content">
 
 <TableRow android:layout_margin="10dip" android:id="@+id/TableRow01" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent">
diff --git a/res/layout/layout_wizard_tips.xml b/res/layout/layout_wizard_tips.xml
index 98b7196..5129935 100644
--- a/res/layout/layout_wizard_tips.xml
+++ b/res/layout/layout_wizard_tips.xml
@@ -5,38 +5,7 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">
             
-
-<RelativeLayout 
-	android:layout_width="fill_parent" 
-	android:layout_height="70sp" 
-	android:id="@+id/relativeLayout1" 
-	android:layout_gravity="center_vertical|center_horizontal"
-	android:background="#000000"
-	>
-        <ImageView 
-        	android:src="@drawable/warning" 
-        	android:id="@+id/orbot_image" 
-        	android:layout_width="wrap_content" 
-        	android:layout_height="wrap_content" 
-        	android:layout_alignParentLeft="true"
-        	android:paddingLeft="20sp" >
-        </ImageView>
-        <TextView 
-        	android:textColor="#FFFFFF"
-        	android:textSize="10pt" 
-        	android:layout_toRightOf="@id/orbot_image" 
-        	android:gravity="center_vertical"
-       	 	android:layout_height="fill_parent" 
-        	android:id="@+id/WizardTextTitle" 
-        	android:layout_width="wrap_content" 
-        	android:fadingEdge="vertical" 
-        	android:text="TITLE"     
-        	android:singleLine="true" 
-        	android:layout_centerInParent="true" 
-        	android:paddingLeft="5sp"
-        	> 
-        </TextView>
-    </RelativeLayout>   
+   
 <TableLayout  android:id="@+id/TableLayout01" android:stretchColumns="*" android:layout_height="fill_parent" android:layout_width="wrap_content">
 
 <TableRow android:layout_margin="10dip"   android:id="@+id/TableRow01" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent">
diff --git a/res/layout/scrollingtext_buttons_view.xml b/res/layout/scrollingtext_buttons_view.xml
index 9a879b7..beea00a 100644
--- a/res/layout/scrollingtext_buttons_view.xml
+++ b/res/layout/scrollingtext_buttons_view.xml
@@ -6,40 +6,7 @@
     android:layout_height="fill_parent"
    >
             
-<RelativeLayout
-    android:id="@+id/relativeLayout1"
-    android:layout_width="fill_parent"
-    android:layout_height="70sp"
-    android:layout_gravity="center_vertical|center_horizontal"
-    android:background="#000000" >
-
-        <ImageView
-            android:id="@+id/orbot_image"
-            android:layout_width="wrap_content"
-            android:layout_height="fill_parent"
-            android:paddingLeft="40sp"
-            android:src="@drawable/warning" 
-            android:gravity="center_vertical"
-            
-            >
-
-        </ImageView>
-
-        <TextView
-            android:id="@+id/WizardTextTitle"
-            android:layout_width="wrap_content"
-            android:layout_height="fill_parent"
-            android:layout_alignParentTop="true"
-            android:layout_centerHorizontal="true"
-            android:fadingEdge="vertical"
-            android:gravity="center_vertical"
-            android:paddingLeft="5sp"
-            android:singleLine="true"
-            android:text="TITLE"
-            android:textColor="#FFFFFF"
-            android:textSize="20dp" />
 
-    </RelativeLayout> 
        
 <TableLayout  android:id="@+id/TableLayout01" android:stretchColumns="*" android:layout_height="fill_parent" android:layout_width="wrap_content" >
 
diff --git a/src/org/torproject/android/wizard/ConfigureTransProxy.java b/src/org/torproject/android/wizard/ConfigureTransProxy.java
index 974c968..856fd0f 100644
--- a/src/org/torproject/android/wizard/ConfigureTransProxy.java
+++ b/src/org/torproject/android/wizard/ConfigureTransProxy.java
@@ -108,8 +108,8 @@ public class ConfigureTransProxy extends Activity implements TorConstants {
 	private void stepSix(){
 		
 			String title = context.getString(R.string.wizard_transproxy_title);
-			TextView txtTitle  = ((TextView)findViewById(R.id.WizardTextTitle));
-			txtTitle.setText(title);
+			
+			setTitle(title);
 			
 			Button back = ((Button)findViewById(R.id.btnWizard1));
 		    Button next = ((Button)findViewById(R.id.btnWizard2));
diff --git a/src/org/torproject/android/wizard/LotsaText.java b/src/org/torproject/android/wizard/LotsaText.java
index 2bff373..b831cca 100644
--- a/src/org/torproject/android/wizard/LotsaText.java
+++ b/src/org/torproject/android/wizard/LotsaText.java
@@ -14,6 +14,7 @@ import android.content.SharedPreferences;
 import android.content.SharedPreferences.Editor;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
+import android.support.v4.app.ActivityCompat;
 import android.view.View;
 import android.widget.Button;
 import android.widget.ImageView;
@@ -80,18 +81,15 @@ public class LotsaText extends Activity implements TorConstants{
 		String title = context.getString(R.string.wizard_title);
 		String msg = context.getString(R.string.wizard_title_msg);
 		
-		TextView txtTitle  = ((TextView)findViewById(R.id.WizardTextTitle));
-		txtTitle.setText(title);
+		setTitle(title);
         
         TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody));
 		txtBody.setText(msg);
 		
         Button btn1 = ((Button)findViewById(R.id.btnWizard1));
         Button btn2 = ((Button)findViewById(R.id.btnWizard2));
-        ImageView img = (ImageView) findViewById(R.id.orbot_image);
         
     	btn1.setVisibility(Button.INVISIBLE);
-    	img.setImageResource(R.drawable.tor);
 
     	btn2.setOnClickListener(new View.OnClickListener() {
 			
@@ -114,18 +112,16 @@ public class LotsaText extends Activity implements TorConstants{
 		String title = context.getString(R.string.wizard_warning_title);
 		String msg = context.getString(R.string.wizard_warning_msg);
 		
-		TextView txtTitle  = ((TextView)findViewById(R.id.WizardTextTitle));
-		txtTitle.setText(title);
-        
+		setTitle(title);
+		
         TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody));
 		txtBody.setText(msg);
 		
         Button btn1 = ((Button)findViewById(R.id.btnWizard1));
         Button btn2 = ((Button)findViewById(R.id.btnWizard2));
-        ImageView img = (ImageView) findViewById(R.id.orbot_image);
         
     	btn1.setVisibility(Button.VISIBLE);
-    	img.setImageResource(R.drawable.warning);
+    	
     	
     	btn1.setOnClickListener(new View.OnClickListener() {
 			
diff --git a/src/org/torproject/android/wizard/Permissions.java b/src/org/torproject/android/wizard/Permissions.java
index dd4a217..0b876b6 100644
--- a/src/org/torproject/android/wizard/Permissions.java
+++ b/src/org/torproject/android/wizard/Permissions.java
@@ -63,13 +63,9 @@ public class Permissions extends Activity implements TorConstants {
 	
 	private void stepFourRoot(){
 				
-		String title = context.getString(R.string.wizard_permissions_title);
 		String msg1 = context.getString(R.string.wizard_permissions_root_msg1);
 		String msg2 = context.getString(R.string.wizard_permissions_root_msg2);
 		
-		TextView txtTitle  = ((TextView)findViewById(R.id.WizardTextTitle));
-		txtTitle.setText(title);
-        
         TextView txtBody1 = ((TextView)findViewById(R.id.WizardTextBody1));
 	    txtBody1.setText(msg1);
 		
@@ -174,9 +170,8 @@ public class Permissions extends Activity implements TorConstants {
 		String title = context.getString(R.string.wizard_permissions_title);
 		String msg = context.getString(R.string.wizard_permissions_no_root_msg);
 		
-		TextView txtTitle  = ((TextView)findViewById(R.id.WizardTextTitle));
-		txtTitle.setText(title);
-        
+		setTitle(title);
+		
         TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody1));
 		txtBody.setText(msg);
 		
@@ -184,9 +179,6 @@ public class Permissions extends Activity implements TorConstants {
         Button btn2 = ((Button)findViewById(R.id.btnWizard2));
         btn2.setEnabled(true);
    
-        ImageView img = (ImageView) findViewById(R.id.orbot_image);
-    	img.setImageResource(R.drawable.warning);
-    
         TextView txtBody2 = ((TextView)findViewById(R.id.WizardTextBody2));
 		txtBody2.setVisibility(TextView.GONE);
 		
diff --git a/src/org/torproject/android/wizard/TipsAndTricks.java b/src/org/torproject/android/wizard/TipsAndTricks.java
index 66b08d6..7b32ec3 100644
--- a/src/org/torproject/android/wizard/TipsAndTricks.java
+++ b/src/org/torproject/android/wizard/TipsAndTricks.java
@@ -62,13 +62,10 @@ public class TipsAndTricks extends Activity implements TorConstants {
 
 	void stepFive(){
 		
+		
 		String title = getString(R.string.wizard_tips_title);
-		TextView txtTitle  = ((TextView)findViewById(R.id.WizardTextTitle));
-		txtTitle.setText(title);
-		 
-		   ImageView img = (ImageView) findViewById(R.id.orbot_image);
-	    	img.setImageResource(R.drawable.onion);
-	    
+		
+		setTitle(title);
 	    	
         Button btnLink = (Button)findViewById(R.id.WizardRootButtonInstallGibberbot);
         
@@ -171,19 +168,17 @@ public class TipsAndTricks extends Activity implements TorConstants {
 		String title =  getString(R.string.wizard_final);
 		String msg = getString(R.string.wizard_final_msg);
 		
-		TextView txtTitle  = ((TextView)findViewById(R.id.WizardTextTitle));
-		txtTitle.setText(title);
+		setTitle(title);
         
         TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody));
 		txtBody.setText(msg);
 		
         Button btn1 = ((Button)findViewById(R.id.btnWizard1));
         Button btn2 = ((Button)findViewById(R.id.btnWizard2));
-        ImageView img = (ImageView) findViewById(R.id.orbot_image);
+        
         
         btn2.setText(getString(R.string.btn_finish));
     	btn1.setVisibility(Button.VISIBLE);
-    	img.setImageResource(R.drawable.onion);
     	
     	btn1.setOnClickListener(new View.OnClickListener() {
 			



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