import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
-import android.view.MenuItem
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
}
}
- override fun onOptionsItemSelected(item: MenuItem): Boolean {
- // As there is only one option, go back.
- onBackPressed()
-
- // Consume the event.
- return true
- }
-
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
// Run the default commands.
super.onRequestPermissionsResult(requestCode, permissions, grantResults)