aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-21 12:23:04 -0700
committerAllan Wang <me@allanwang.ca>2017-06-21 12:23:04 -0700
commit372c5da8d09ff9928f937c4288b3f92351a576da (patch)
tree82bab43c3a54650cdf5978896d21e372f839e6e5 /sample
parent7601adcb8254b4dc1818526061e1013f2e216fc5 (diff)
downloadkau-372c5da8d09ff9928f937c4288b3f92351a576da.tar.gz
kau-372c5da8d09ff9928f937c4288b3f92351a576da.tar.bz2
kau-372c5da8d09ff9928f937c4288b3f92351a576da.zip
Add more configs in email builder
Diffstat (limited to 'sample')
-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>