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

[tor-commits] [orbot/master] Tips and Tricks screen added



commit 22118bc38280bdf3d375018dac1c0de743b75ec0
Author: Sathyanarayanan Gunasekaran <gsathya.ceg@xxxxxxxxx>
Date:   Mon Jun 6 02:25:18 2011 +0530

    Tips and Tricks screen added
---
 res/drawable/icon_otrchat.png                 |  Bin 4610 -> 0 bytes
 res/layout/layout_wizard_tips.xml             |   63 +++++++++++++--
 res/values/strings.xml                        |   13 ++-
 src/org/torproject/android/Permissions.java   |    4 +-
 src/org/torproject/android/TipsAndTricks.java |  103 +++++++++++++++++++++++++
 5 files changed, 168 insertions(+), 15 deletions(-)

diff --git a/res/drawable/icon_otrchat.png b/res/drawable/icon_otrchat.png
deleted file mode 100755
index 08171ab..0000000
Binary files a/res/drawable/icon_otrchat.png and /dev/null differ
diff --git a/res/layout/layout_wizard_tips.xml b/res/layout/layout_wizard_tips.xml
index 19aaef0..60cba51 100644
--- a/res/layout/layout_wizard_tips.xml
+++ b/res/layout/layout_wizard_tips.xml
@@ -1,15 +1,54 @@
 <?xml version="1.0" encoding="utf-8"?>
 
-
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
     android:orientation="vertical"
     android:layout_width="fill_parent"
-    android:layout_height="wrap_content">
+    android:layout_height="fill_parent"
+            android:background="@drawable/background">
+            
+<RelativeLayout 
+	android:layout_width="match_parent" 
+	android:layout_height="wrap_content" 
+	android:id="@+id/relativeLayout1" 
+	android:layout_gravity="center_horizontal">
+        <ImageView 
+        	android:src="@drawable/tor" 
+        	android:id="@+id/orbot_image" 
+        	android:layout_width="wrap_content" 
+        	android:layout_height="wrap_content" 
+        	android:layout_alignParentLeft="true"
+        	android:paddingLeft="20px" android:paddingRight="20px" >
+        </ImageView>
+        <TextView android:textSize="10pt" 
+        	android:layout_toRightOf="@id/orbot_image" 
+        	android:layout_alignParentTop="true"
+        	android:gravity="center_vertical"
+       	 	android:layout_height="wrap_content" 
+        	android:id="@+id/WizardTextTitle" 
+        	android:layout_width="wrap_content" 
+        	android:fadingEdge="vertical" 
+        	android:text="TITLE" 
+        	android:textColor="#00ff00" 
+        	android:singleLine="true" 
+        	
+        	
+        	
+        	android:layout_centerInParent="true" 
+        	android:padding="20px"> 
+        </TextView>
+    </RelativeLayout>    
+<TableLayout android:id="@+id/TableLayout01" android:stretchColumns="*" android:layout_height="fill_parent" android:layout_width="wrap_content">
+
+<TableRow android:id="@+id/TableRow01" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent">
+
+
 	<ScrollView android:id="@+id/helpscrollview" 
 		android:orientation="vertical"
 		android:layout_width="fill_parent" 
-		android:layout_height="fill_parent">    
-		<LinearLayout
+		android:layout_height="fill_parent"
+		 android:layout_span="3">    
+
+<LinearLayout
 		    android:orientation="vertical"
 		    android:layout_width="fill_parent"
 		    android:layout_height="fill_parent"
@@ -17,13 +56,21 @@
 		    
 <TextView android:text="@string/wizard_tips_msg" android:layout_gravity="left"	android:textColor="#ffffff" android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
 
-<Button android:text="@string/wizard_tips_otrchat"  android:layout_gravity="left" android:drawableLeft="@drawable/ic_launcher_gibberbot"  android:layout_marginTop="10px" android:id="@+id/WizardRootButtonInstallOtrchat" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
+<Button android:text="@string/wizard_tips_gibberbot"  android:layout_gravity="left" android:drawableLeft="@drawable/ic_launcher_gibberbot"  android:layout_marginTop="10px" android:id="@+id/WizardRootButtonInstallGibberbot" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
 
-<Button android:text="@string/wizard_tips_orweb"  android:drawableLeft="@drawable/icon_orweb" android:layout_marginTop="10px" android:id="@+id/WizardRootButtonInstallOrweb" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
+<Button android:text="@string/wizard_tips_firefox"  android:layout_gravity="left" android:drawableLeft="@drawable/icon_firefox" android:layout_marginTop="10px" android:id="@+id/WizardRootButtonInstallFirefox" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
 
-<Button android:text="@string/wizard_tips_proxy" android:layout_marginTop="10px" android:id="@+id/WizardRootButtonProxyHelp" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
+<Button android:text="@string/wizard_tips_proxymob" android:layout_marginTop="10px" android:id="@+id/WizardRootButtonInstallProxyMob" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
 
 			</LinearLayout>
-		</ScrollView>			
+		</ScrollView>
+		
+</TableRow>
+<TableRow android:id="@+id/TableRow01" android:textColor="#00ff00" android:layout_width="fill_parent" android:layout_height="30px">
+	   	<Button android:text="Back" android:id="@+id/btnWizard1" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
+    	<Button android:text="Next" android:id="@+id/btnWizard2"  android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>	    
+</TableRow>			
+</TableLayout>
 </LinearLayout>
 
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f4ca03c..25e253d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -99,7 +99,6 @@
     
     <string name="wizard_tips_tricks">Orbot-enabled Apps</string>
     <string name="wizard_tips_msg">We encourage you to download &amp; use apps that know how to connect directly to Orbot. Click on the buttons below to install.</string>
-    <string name="wizard_tips_otrchat">Gibberbot - Secure instant messaging client for Android</string>
     <string name="wizard_tips_orweb">ORWEB (Android 1.x Only) - Browser designed for privacy &amp; for Orbot</string>
     <string name="wizard_tips_proxy">Proxy Settings - Learn how to configure apps to work with Orbot</string>
     
@@ -113,8 +112,6 @@
     <string name="wizard_final">Orbot is ready!</string>
     <string name="wizard_final_msg">Hundreds of thousands of people around the world use Tor for a wide variety of reasons: journalists and bloggers, human rights workers, law enforcement officers, soldiers, corporations, citizens of repressive regimes, and just ordinary citizens... and now you are ready to, as well!</string>
     
-    <string name="otrchat_apk_url">market://search?q=pname:info.guardianproject.otr.app.im</string>
-    <string name="orweb_apk_url">market://search?q=pname:nfo.guardianproject.browser</string>
     
  <!-- END Welcome Wizard strings (DJH) -->
 
@@ -140,6 +137,12 @@
 	<string name="wizard_permissions_root_msg1">Orbot has detected that you have root permissions enabled. To enable \'Transparent Proxying\', please grant superuser privileges to Orbot</string>
 	<string name="wizard_permissions_root_msg2">If you choose to continue without providing superuser privileges, make sure to use apps made to work with orbot</string>
 	<string name="wizard_permissions_msg">Orbot has detected that you do not have root permissions.\nTransparent Proxying is not possible without superuser privileges.\nMake sure to use apps that have been configured to work with Orbot</string>
-	
-	
+	<!-- TipsAndTricks screen -->
+	<string name="wizard_tips_gibberbot">Gibberbot - Secure instant messaging client for Android</string>
+	<string name="wizard_tips_firefox">Firefox - Android browser - To be used along with ProxyMob Add-on </string>
+	<string name="wizard_tips_proxymob">ProxyMob - Simple Firefox Add-on for setting HTTP, SOCKS and SSL proxy settings</string>
+	<string name="gibberbot_apk_url">https://market.android.com/details?id=info.guardianproject.otr.app.im</string>
+    <string name="firefox_apk_url">https://market.android.com/details?id=org.mozilla.firefox</string>
+    <string name="proxymob_url">https://addons.mozilla.org/mobile/downloads/latest/251558/type:attachment/addon-251558-latest.xpi?src=addon-detail</string>
+    
 </resources>
diff --git a/src/org/torproject/android/Permissions.java b/src/org/torproject/android/Permissions.java
index bd96e56..996a1dc 100644
--- a/src/org/torproject/android/Permissions.java
+++ b/src/org/torproject/android/Permissions.java
@@ -133,7 +133,7 @@ public class Permissions extends Activity implements TorConstants {
 			
 			@Override
 			public void onClick(View v) {
-				//Tips Screen
+				startActivityForResult(new Intent(getBaseContext(), TipsAndTricks.class), 1);
 			}
 		});
 		
@@ -167,7 +167,7 @@ public class Permissions extends Activity implements TorConstants {
 			
 			@Override
 			public void onClick(View v) {
-					//Tips Screen
+				startActivityForResult(new Intent(getBaseContext(), TipsAndTricks.class), 1);
 			}
 		});
 	}
diff --git a/src/org/torproject/android/TipsAndTricks.java b/src/org/torproject/android/TipsAndTricks.java
new file mode 100644
index 0000000..c4aba96
--- /dev/null
+++ b/src/org/torproject/android/TipsAndTricks.java
@@ -0,0 +1,103 @@
+package org.torproject.android;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+
+public class TipsAndTricks extends Activity implements TorConstants {
+
+	private Context context;
+	
+	protected void onCreate(Bundle savedInstanceState)
+	{
+        super.onCreate(savedInstanceState);
+        context = this;
+
+	}
+	
+	@Override
+	protected void onStart() {
+		
+		super.onStart();
+		setContentView(R.layout.layout_wizard_tips);
+		
+		//stepFive();
+        
+	}
+	
+	@Override
+	protected void onResume() {
+		super.onResume();
+	
+		
+	}
+	
+	void stepFive(){
+		
+		
+        
+        Button btn1 = (Button)findViewById(R.id.WizardRootButtonInstallGibberbot);
+        
+        btn1.setOnClickListener(new OnClickListener() {
+			
+			@Override
+			public void onClick(View view) {
+
+				String url = context.getString(R.string.gibberbot_apk_url);
+				context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
+
+			}
+		});
+        
+        Button btn2 = (Button)findViewById(R.id.WizardRootButtonInstallFirefox);
+
+        btn2.setOnClickListener(new OnClickListener() {
+			
+			@Override
+			public void onClick(View view) {
+				
+				String url = context.getString(R.string.firefox_apk_url);
+				context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
+
+			}
+		});
+        
+        Button btn3 = (Button)findViewById(R.id.WizardRootButtonInstallProxyMob);
+        
+        btn3.setOnClickListener(new OnClickListener() {
+			
+			@Override
+			public void onClick(View view) {
+
+				String url = context.getString(R.string.proxymob_url);
+				context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
+			}
+		});
+        
+        Button back = ((Button)findViewById(R.id.btnWizard1));
+        Button next = ((Button)findViewById(R.id.btnWizard2));
+        
+        back.setOnClickListener(new View.OnClickListener() {
+			
+			@Override
+			public void onClick(View v) {
+				
+				startActivityForResult(new Intent(getBaseContext(), Permissions.class), 1);
+			}
+		});
+    	
+    	next.setOnClickListener(new View.OnClickListener() {
+			
+			@Override
+			public void onClick(View v) {
+				//Finsh Screen
+			}
+		});
+        
+	}
+}
\ No newline at end of file



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