diff options
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java b/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java index 8f5d1718..1bbe5235 100644 --- a/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java +++ b/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java @@ -16,6 +16,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.text.InputType; import android.view.LayoutInflater; +import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.view.inputmethod.InputMethodManager; @@ -61,6 +62,16 @@ public class SshKeyGen extends AppCompatActivity { } } + @Override + public boolean onOptionsItemSelected(MenuItem item) { + if (item.getItemId() == android.R.id.home) { + // The back arrow in the action bar should act the same as the back button. + onBackPressed(); + return true; + } + return super.onOptionsItemSelected(item); + } + // Invoked when 'Generate' button of SshKeyGenFragment clicked. Generates a // private and public key, then replaces the SshKeyGenFragment with a // ShowSshKeyFragment which displays the public key. |
