Mercurial > cgi-bin > hgweb.cgi > SimpleResizer
comparison app/src/main/java/com/bartsent/simpleresizer/EditImage.kt @ 40:cfb19d4ccf78
About screen (but it has broken Edit screen).
author | David Barts <n5jrn@me.com> |
---|---|
date | Mon, 05 Apr 2021 09:08:31 -0700 |
parents | 0dbd924cb5e8 |
children | 45e4df5226c0 |
comparison
equal
deleted
inserted
replaced
39:d723d07d5bc0 | 40:cfb19d4ccf78 |
---|---|
60 menuInflater.inflate(R.menu.menu_edit, menu) | 60 menuInflater.inflate(R.menu.menu_edit, menu) |
61 return super.onCreateOptionsMenu(menu) | 61 return super.onCreateOptionsMenu(menu) |
62 } | 62 } |
63 | 63 |
64 override fun onOptionsItemSelected(item: MenuItem): Boolean { | 64 override fun onOptionsItemSelected(item: MenuItem): Boolean { |
65 if (item.itemId == R.id.settings_item) { | 65 when (item.itemId) { |
66 startActivity( | 66 R.id.settings_item -> { |
67 Intent(Intent.ACTION_APPLICATION_PREFERENCES, null, this, | 67 startActivity( |
68 SettingsActivity::class.java)) | 68 Intent(Intent.ACTION_APPLICATION_PREFERENCES, null, this, |
69 return true | 69 SettingsActivity::class.java)) |
70 } | 70 return true |
71 return false | 71 } |
72 R.id.about_item -> { | |
73 startActivity(Intent(this, About::class.java )) | |
74 return true | |
75 } | |
76 else -> return false | |
77 } | |
72 } | 78 } |
73 | 79 |
74 // Cribbed from: https://stackoverflow.com/questions/5568874/how-to-extract-the-file-name-from-uri-returned-from-intent-action-get-content | 80 // Cribbed from: https://stackoverflow.com/questions/5568874/how-to-extract-the-file-name-from-uri-returned-from-intent-action-get-content |
75 private fun getFileName(uri: Uri): String? { | 81 private fun getFileName(uri: Uri): String? { |
76 var result: String? = null | 82 var result: String? = null |