aboutsummaryrefslogtreecommitdiff
path: root/sample/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sample/src/main')
-rw-r--r--sample/src/main/AndroidManifest.xml2
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt24
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt2
3 files changed, 24 insertions, 4 deletions
diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml
index 0ab360e..66b73c3 100644
--- a/sample/src/main/AndroidManifest.xml
+++ b/sample/src/main/AndroidManifest.xml
@@ -24,7 +24,7 @@
</activity>
<activity
android:name=".AnimActivity"
- android:theme="@style/AppTheme.Slide" />
+ android:theme="@style/Kau.Translucent" />
<activity
android:name=".AboutActivity"
android:theme="@style/Kau.Translucent.About" />
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
index fbcb88f..c2db025 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
@@ -1,10 +1,15 @@
package ca.allanwang.kau.sample
import android.os.Bundle
-import android.provider.MediaStore
import android.support.v7.app.AppCompatActivity
import ca.allanwang.kau.logging.KL
-import ca.allanwang.kau.permissions.*
+import ca.allanwang.kau.permissions.PERMISSION_ACCESS_COARSE_LOCATION
+import ca.allanwang.kau.permissions.PERMISSION_ACCESS_FINE_LOCATION
+import ca.allanwang.kau.permissions.kauOnRequestPermissionsResult
+import ca.allanwang.kau.permissions.kauRequestPermissions
+import ca.allanwang.kau.swipe.kauSwipeOnCreate
+import ca.allanwang.kau.swipe.kauSwipeOnDestroy
+import ca.allanwang.kau.swipe.kauSwipeOnPostCreate
import ca.allanwang.kau.utils.fullLinearRecycler
import ca.allanwang.kau.utils.startActivitySlideOut
import ca.allanwang.kau.utils.toast
@@ -35,6 +40,21 @@ class AnimActivity : AppCompatActivity() {
}
true
}
+ kauSwipeOnCreate()
+ }
+
+ override fun onPostCreate(savedInstanceState: Bundle?) {
+ super.onPostCreate(savedInstanceState)
+ kauSwipeOnPostCreate()
+ }
+
+ override fun onDestroy() {
+ super.onDestroy()
+ kauSwipeOnDestroy()
+ }
+
+ override fun finish() {
+ super.finish()
}
override fun onBackPressed() {
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 d0a5ee1..1f2d757 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -210,7 +210,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_settings -> startActivity(AnimActivity::class.java)
R.id.action_email -> sendEmail(R.string.your_email, R.string.your_subject)
R.id.test -> startActivity(ImageActivity::class.java, transition = true)
else -> return super.onOptionsItemSelected(item)