[tor-commits] [orbot/master] Fixed CheckBox BUG
n8fr8 at torproject.org
n8fr8 at torproject.org
Fri Oct 28 15:28:26 UTC 2011
commit 870ce6a91d8072aa8169c7ce9bd6aadc9cb6a793
Author: Sathyanarayanan Gunasekaran <gsathya.ceg at gmail.com>
Date: Sat Jun 11 02:53:02 2011 +0530
Fixed CheckBox BUG
Previously, the "next" button was not disabled when the CheckBox
was unchecked. Changed it. Also, updated the logic inside the
CheckBox's listener.
---
src/org/torproject/android/Permissions.java | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/org/torproject/android/Permissions.java b/src/org/torproject/android/Permissions.java
index 3b782df..4b74c55 100644
--- a/src/org/torproject/android/Permissions.java
+++ b/src/org/torproject/android/Permissions.java
@@ -113,7 +113,7 @@ public class Permissions extends Activity implements TorConstants {
Button back = ((Button)findViewById(R.id.btnWizard1));
Button next = ((Button)findViewById(R.id.btnWizard2));
- next.setClickable(false);
+ next.setEnabled(false);
CheckBox consent = (CheckBox)findViewById(R.id.checkBox);
consent.setVisibility(CheckBox.VISIBLE);
@@ -129,16 +129,16 @@ public class Permissions extends Activity implements TorConstants {
Editor pEdit = prefs.edit();
- pEdit.putBoolean(PREF_TRANSPARENT, isChecked);
- pEdit.putBoolean(PREF_TRANSPARENT_ALL, isChecked);
+ pEdit.putBoolean(PREF_TRANSPARENT, !isChecked);
+ pEdit.putBoolean(PREF_TRANSPARENT_ALL, !isChecked);
pEdit.commit();
Button next = ((Button)findViewById(R.id.btnWizard2));
if(isChecked)
- next.setClickable(true);
+ next.setEnabled(true);
else
- next.setClickable(false);
+ next.setEnabled(false);
}
@@ -166,7 +166,9 @@ public class Permissions extends Activity implements TorConstants {
}
});
- next.setOnClickListener(new View.OnClickListener() {
+
+ next.setOnClickListener(new View.OnClickListener() {
+
@Override
public void onClick(View v) {
@@ -178,7 +180,7 @@ public class Permissions extends Activity implements TorConstants {
private void stepFour(){
-
+ Toast.makeText(context, "NON ROOT FUNC", Toast.LENGTH_SHORT).show();
String title = context.getString(R.string.wizard_permissions_title);
String msg = context.getString(R.string.wizard_permissions_msg);
More information about the tor-commits
mailing list