diff --git a/app/src/main/java/om/sstvencoder/MainActivity.java b/app/src/main/java/om/sstvencoder/MainActivity.java index af97f49..4a2342c 100644 --- a/app/src/main/java/om/sstvencoder/MainActivity.java +++ b/app/src/main/java/om/sstvencoder/MainActivity.java @@ -342,6 +342,9 @@ public class MainActivity extends AppCompatActivity { else if (id == R.id.action_rotate) { mCropView.rotateImage(90); } + else if (id == R.id.action_privacy_policy) { + showTextPage(getString(R.string.action_privacy_policy), getString(R.string.action_privacy_policy_text)); + } else if (id != R.id.action_modes) { String className = item.getIntent().getStringExtra(CLASS_NAME); setMode(className); @@ -349,6 +352,14 @@ public class MainActivity extends AppCompatActivity { return true; } + private void showTextPage(String title, String message) { + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle(title); + builder.setMessage(message); + builder.setNeutralButton(R.string.btn_ok, null); + builder.show(); + } + private void setMode(String modeClassName) { if (mEncoder.setMode(modeClassName)) { IModeInfo modeInfo = mEncoder.getModeInfo(); diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index b0d3a4e..2ab2e11 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -40,4 +40,9 @@ app:showAsAction="ifRoom">
+