diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0488fca..bb97f0b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -15,5 +15,21 @@ + + + + + + + diff --git a/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/AboutActivity.kt b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/AboutActivity.kt new file mode 100644 index 0000000..5045c19 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/AboutActivity.kt @@ -0,0 +1,9 @@ +package com.simplemobiletools.thankyou.activities + +import android.os.Bundle + +class AboutActivity : SimpleActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/LicenseActivity.kt b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/LicenseActivity.kt new file mode 100644 index 0000000..9f5294b --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/LicenseActivity.kt @@ -0,0 +1,9 @@ +package com.simplemobiletools.thankyou.activities + +import android.os.Bundle + +class LicenseActivity : SimpleActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/MainActivity.kt index 518155e..70185bf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/MainActivity.kt @@ -1,6 +1,9 @@ package com.simplemobiletools.thankyou.activities +import android.content.Intent import android.os.Bundle +import android.view.Menu +import android.view.MenuItem import com.simplemobiletools.thankyou.R class MainActivity : SimpleActivity() { @@ -14,4 +17,23 @@ class MainActivity : SimpleActivity() { super.onDestroy() mConfig.isFirstRun = false } + + override fun onCreateOptionsMenu(menu: Menu): Boolean { + menuInflater.inflate(R.menu.menu_main, menu) + return true + } + + override fun onOptionsItemSelected(item: MenuItem): Boolean { + return when (item.itemId) { + R.id.settings -> { + startActivity(Intent(applicationContext, SettingsActivity::class.java)) + true + } + R.id.about -> { + startActivity(Intent(applicationContext, AboutActivity::class.java)) + true + } + else -> super.onOptionsItemSelected(item) + } + } } diff --git a/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/SettingsActivity.kt new file mode 100644 index 0000000..5884190 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/SettingsActivity.kt @@ -0,0 +1,9 @@ +package com.simplemobiletools.thankyou.activities + +import android.os.Bundle + +class SettingsActivity : SimpleActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + } +} diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml new file mode 100644 index 0000000..815619c --- /dev/null +++ b/app/src/main/res/menu/menu_main.xml @@ -0,0 +1,12 @@ + + + + +