override fun onOptionsItemSelected(item: MenuItem): Boolean { return when (item.itemId) { R.id.action_delete_all -> { val intent = Intent(this, StatsActivity::class.java) startActivity(intent) true } else -> super.onOptionsItemSelected(item) } }