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.
This commit is contained in:
parent
0eb64792bf
commit
870ce6a91d
|
@ -113,7 +113,7 @@ public class Permissions extends Activity implements TorConstants {
|
||||||
|
|
||||||
Button back = ((Button)findViewById(R.id.btnWizard1));
|
Button back = ((Button)findViewById(R.id.btnWizard1));
|
||||||
Button next = ((Button)findViewById(R.id.btnWizard2));
|
Button next = ((Button)findViewById(R.id.btnWizard2));
|
||||||
next.setClickable(false);
|
next.setEnabled(false);
|
||||||
|
|
||||||
CheckBox consent = (CheckBox)findViewById(R.id.checkBox);
|
CheckBox consent = (CheckBox)findViewById(R.id.checkBox);
|
||||||
consent.setVisibility(CheckBox.VISIBLE);
|
consent.setVisibility(CheckBox.VISIBLE);
|
||||||
|
@ -129,16 +129,16 @@ public class Permissions extends Activity implements TorConstants {
|
||||||
|
|
||||||
Editor pEdit = prefs.edit();
|
Editor pEdit = prefs.edit();
|
||||||
|
|
||||||
pEdit.putBoolean(PREF_TRANSPARENT, isChecked);
|
pEdit.putBoolean(PREF_TRANSPARENT, !isChecked);
|
||||||
pEdit.putBoolean(PREF_TRANSPARENT_ALL, isChecked);
|
pEdit.putBoolean(PREF_TRANSPARENT_ALL, !isChecked);
|
||||||
|
|
||||||
pEdit.commit();
|
pEdit.commit();
|
||||||
|
|
||||||
Button next = ((Button)findViewById(R.id.btnWizard2));
|
Button next = ((Button)findViewById(R.id.btnWizard2));
|
||||||
if(isChecked)
|
if(isChecked)
|
||||||
next.setClickable(true);
|
next.setEnabled(true);
|
||||||
else
|
else
|
||||||
next.setClickable(false);
|
next.setEnabled(false);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -166,8 +166,10 @@ public class Permissions extends Activity implements TorConstants {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
next.setOnClickListener(new View.OnClickListener() {
|
next.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
startActivityForResult(new Intent(getBaseContext(), TipsAndTricks.class), 1);
|
startActivityForResult(new Intent(getBaseContext(), TipsAndTricks.class), 1);
|
||||||
|
@ -178,7 +180,7 @@ public class Permissions extends Activity implements TorConstants {
|
||||||
|
|
||||||
private void stepFour(){
|
private void stepFour(){
|
||||||
|
|
||||||
|
Toast.makeText(context, "NON ROOT FUNC", Toast.LENGTH_SHORT).show();
|
||||||
String title = context.getString(R.string.wizard_permissions_title);
|
String title = context.getString(R.string.wizard_permissions_title);
|
||||||
String msg = context.getString(R.string.wizard_permissions_msg);
|
String msg = context.getString(R.string.wizard_permissions_msg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue