/* * Copyright © 2014-2020 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) } } }