Created
June 1, 2020 14:32
-
-
Save lomza/ffcf0a0926efb10888755a2b8bb03e17 to your computer and use it in GitHub Desktop.
MainActivity.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreateOptionsMenu(menu: Menu?): Boolean { | |
menuInflater.inflate(R.menu.overflow, menu) | |
return true | |
} | |
override fun onOptionsItemSelected(item: MenuItem): Boolean { | |
return when (item.itemId) { | |
R.id.action_delete_list_data -> { | |
deleteCurrentListData() | |
true | |
} | |
R.id.action_re_create_database -> { | |
reCreateDatabase() | |
true | |
} | |
R.id.action_export_to_csv_file -> { | |
exportDatabaseToCSVFile() | |
true | |
} | |
else -> super.onOptionsItemSelected(item) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment