diff 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
line wrap: on
line diff
--- a/app/src/main/java/com/bartsent/simpleresizer/EditImage.kt	Sat Apr 03 09:24:30 2021 -0700
+++ b/app/src/main/java/com/bartsent/simpleresizer/EditImage.kt	Mon Apr 05 09:08:31 2021 -0700
@@ -62,13 +62,19 @@
     }
 
     override fun onOptionsItemSelected(item: MenuItem): Boolean {
-        if (item.itemId == R.id.settings_item) {
-            startActivity(
-                Intent(Intent.ACTION_APPLICATION_PREFERENCES, null, this,
-                    SettingsActivity::class.java))
-            return true
+        when (item.itemId) {
+            R.id.settings_item -> {
+                startActivity(
+                    Intent(Intent.ACTION_APPLICATION_PREFERENCES, null, this,
+                        SettingsActivity::class.java))
+                return true
+            }
+            R.id.about_item -> {
+                startActivity(Intent(this, About::class.java ))
+                return true
+            }
+            else -> return false
         }
-        return false
     }
 
     // Cribbed from: https://stackoverflow.com/questions/5568874/how-to-extract-the-file-name-from-uri-returned-from-intent-action-get-content