blob: 21d82a3b61815fdb96c91235015a36fcbf806764 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* Copyright © 2014-2019 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.sshkeygen
import android.os.Bundle
import android.view.MenuItem
import androidx.appcompat.app.AppCompatActivity
class SshKeyGenActivity : AppCompatActivity() {
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
title = "Generate SSH Key"
if (savedInstanceState == null) {
supportFragmentManager
.beginTransaction()
.replace(android.R.id.content, SshKeyGenFragment())
.commit()
}
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
// The back arrow in the action bar should act the same as the back button.
return when (item.itemId) {
android.R.id.home -> {
onBackPressed()
true
}
else -> super.onOptionsItemSelected(item)
}
}
}
|