aboutsummaryrefslogtreecommitdiff
path: root/sample/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sample/src/main')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt2
-rw-r--r--sample/src/main/res/menu/menu_main.xml7
-rw-r--r--sample/src/main/res/values/strings.xml2
3 files changed, 10 insertions, 1 deletions
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
index a03857a..8867a00 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -3,6 +3,7 @@ package ca.allanwang.kau.sample
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
+import ca.allanwang.kau.email.sendEmail
import ca.allanwang.kau.kpref.KPrefActivity
import ca.allanwang.kau.kpref.KPrefAdapterBuilder
import ca.allanwang.kau.utils.*
@@ -103,6 +104,7 @@ class MainActivity : KPrefActivity() {
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.action_settings -> startActivity(AnimActivity::class.java, clearStack = true)
+ R.id.action_email -> sendEmail(R.string.your_email, R.string.your_subject)
else -> return super.onOptionsItemSelected(item)
}
return true
diff --git a/sample/src/main/res/menu/menu_main.xml b/sample/src/main/res/menu/menu_main.xml
index 3725b18..caafd48 100644
--- a/sample/src/main/res/menu/menu_main.xml
+++ b/sample/src/main/res/menu/menu_main.xml
@@ -5,7 +5,12 @@
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
- android:title="Settings"
+ android:title="@string/kau_settings"
+ app:showAsAction="never" />
+ <item
+ android:id="@+id/action_email"
+ android:orderInCategory="2100"
+ android:title="@string/kau_send_feedback"
app:showAsAction="never" />
</menu>
diff --git a/sample/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml
index 7399593..049a395 100644
--- a/sample/src/main/res/values/strings.xml
+++ b/sample/src/main/res/values/strings.xml
@@ -15,4 +15,6 @@
<string name="color_custom_alpha">This selector allows for custom colors with alpha values</string>
<string name="text">Text Pref</string>
<string name="text_desc">Saves the text</string>
+ <string name="your_email">your.email@here.com</string>
+ <string name="your_subject">Your subject</string>
</resources>