From 10e2ee9d4f105d9737b98b1caacf5e6ccb1c3c7d Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Wed, 5 Jul 2017 12:51:21 -0700 Subject: Remap color dark and fix up swipe --- .../kotlin/ca/allanwang/kau/sample/AnimActivity.kt | 24 ++++++++++++++++++++-- .../kotlin/ca/allanwang/kau/sample/MainActivity.kt | 2 +- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'sample/src/main/kotlin') 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) -- cgit v1.2.3