[tor-commits] [orbot/master] add new background graphics state change to main UI

n8fr8 at torproject.org n8fr8 at torproject.org
Fri Apr 4 03:27:24 UTC 2014


commit 4e1357bccae60e4f7c65c634803ef2c195659b65
Author: Nathan Freitas <nathan at freitas.net>
Date:   Mon Mar 3 10:37:20 2014 -0500

    add new background graphics state change to main UI
---
 src/org/torproject/android/Orbot.java |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java
index 5eb66fd..3ddf93c 100644
--- a/src/org/torproject/android/Orbot.java
+++ b/src/org/torproject/android/Orbot.java
@@ -68,6 +68,7 @@ public class Orbot extends SherlockActivity implements TorConstants, OnLongClick
     private TextView mTxtOrbotLog = null;
     private SlidingDrawer mDrawer = null;
     private boolean mDrawerOpen = false;
+    private View mViewMain = null;
 
 	/* Some tracking bits */
 	private int torStatus = TorServiceConstants.STATUS_OFF; //latest status reported from the tor service
@@ -95,6 +96,7 @@ public class Orbot extends SherlockActivity implements TorConstants, OnLongClick
 	{
     	setContentView(R.layout.layout_main);
 		
+    	mViewMain = findViewById(R.id.viewMain);
     	lblStatus = (TextView)findViewById(R.id.lblStatus);
 		lblStatus.setOnLongClickListener(this);
     	imgStatus = (ImageProgressView)findViewById(R.id.imgStatus);
@@ -718,6 +720,7 @@ public class Orbot extends SherlockActivity implements TorConstants, OnLongClick
                             {
                                     imgStatus.setImageResource(R.drawable.toron);
 
+                            		mViewMain.setBackgroundResource(R.drawable.onionrootonly);
                            //         hideProgressDialog();
                                     
                                     String lblMsg = getString(R.string.status_activated);
@@ -760,7 +763,9 @@ public class Orbot extends SherlockActivity implements TorConstants, OnLongClick
                             {
                                     
                                     imgStatus.setImageResource(R.drawable.torstarting);
-                                    
+
+                            		mViewMain.setBackgroundResource(R.drawable.onionrootonlygold);
+                            		
                                     if (lblStatus != null && torServiceMsg != null)
                                     	if (torServiceMsg.indexOf('%')!=-1)
                                     		lblStatus.setText(torServiceMsg);
@@ -776,7 +781,8 @@ public class Orbot extends SherlockActivity implements TorConstants, OnLongClick
 
 
                                   //  hideProgressDialog();
-                                    
+                            		mViewMain.setBackgroundResource(R.drawable.onionrootonlygrey);
+                            	
                                     imgStatus.setImageResource(R.drawable.toroff);
                                     lblStatus.setText(getString(R.string.status_disabled) + "\n" + getString(R.string.press_to_start));
                                     





More information about the tor-commits mailing list