aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-05 12:51:21 -0700
committerAllan Wang <me@allanwang.ca>2017-07-05 12:51:21 -0700
commit10e2ee9d4f105d9737b98b1caacf5e6ccb1c3c7d (patch)
tree81f2976a43b65a28c428b1ae60a62888e573a756 /sample
parent4e254b4b983b8531193c02852d2866a876d8cfcf (diff)
downloadkau-10e2ee9d4f105d9737b98b1caacf5e6ccb1c3c7d.tar.gz
kau-10e2ee9d4f105d9737b98b1caacf5e6ccb1c3c7d.tar.bz2
kau-10e2ee9d4f105d9737b98b1caacf5e6ccb1c3c7d.zip
Remap color dark and fix up swipe
Diffstat (limited to 'sample')
-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)