Skip to content

Commit 529424d

Browse files
authored
Added OK button to instructions dialog, About dialog
1 parent ba2cfde commit 529424d

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

app/src/main/java/com/devadvance/rootcloak2/SettingsActivity.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.annotation.SuppressLint;
44
import android.app.AlertDialog;
55
import android.app.ListActivity;
6+
import android.content.DialogInterface;
67
import android.content.Intent;
78
import android.content.SharedPreferences;
89
import android.content.SharedPreferences.Editor;
@@ -63,7 +64,13 @@ public void onListItemClick(ListView parent, View v, int position, long id) {
6364
Log.d(LOG_TAG, "Debug is now on");
6465
new AlertDialog.Builder(this)
6566
.setMessage(instructionsString)
66-
.setTitle(instructionsTitle).show();
67+
.setTitle(instructionsTitle)
68+
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
69+
public void onClick(DialogInterface dialog, int id) {
70+
dialog.cancel();
71+
}
72+
})
73+
.show();
6774
break;
6875
case 4:
6976
boolean debugPref = sharedPref.getBoolean(Common.PACKAGE_NAME
@@ -85,6 +92,18 @@ public void onListItemClick(ListView parent, View v, int position, long id) {
8592
debugStatus,
8693
Toast.LENGTH_LONG).show();
8794
break;
95+
case 5:
96+
String aboutMsg = getString(R.string.app_name) + ": " + BuildConfig.VERSION_NAME; //TODO!
97+
new AlertDialog.Builder(this)
98+
.setMessage(aboutMsg)
99+
.setTitle(R.string.about)
100+
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
101+
public void onClick(DialogInterface dialog, int id) {
102+
dialog.cancel();
103+
}
104+
})
105+
.show();
106+
break;
88107
default:
89108
break;
90109
}

0 commit comments

Comments
 (0)