diff options
Diffstat (limited to 'sample/src/main/kotlin/ca/allanwang')
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt | 24 | ||||
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt | 2 |
2 files changed, 23 insertions, 3 deletions
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) |