diff options
Diffstat (limited to 'sample/src/main/kotlin/ca')
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt | 8 | ||||
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/SwipeActivity.kt | 13 |
2 files changed, 5 insertions, 16 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 cd86d38..f052d97 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt @@ -10,7 +10,6 @@ import ca.allanwang.kau.permissions.kauRequestPermissions import ca.allanwang.kau.swipe.SWIPE_EDGE_LEFT 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 @@ -49,14 +48,9 @@ class AnimActivity : KauBaseActivity() { } } - override fun onPostCreate(savedInstanceState: Bundle?) { - super.onPostCreate(savedInstanceState) - kauSwipeOnPostCreate() - } - override fun onDestroy() { - super.onDestroy() kauSwipeOnDestroy() + super.onDestroy() } override fun onBackPressed() { diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/SwipeActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/SwipeActivity.kt index cba9ccd..da088cf 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/SwipeActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/SwipeActivity.kt @@ -40,9 +40,6 @@ class SwipeActivity : KauBaseActivity() { it.setOnClickListener { startActivityWithEdge(swipeEdge) } } val flag = intent.getIntExtra(SWIPE_EDGE, -1) - kauSwipeOnCreate { - edgeFlag = flag - } toolbar.title = when (flag) { SWIPE_EDGE_LEFT -> "Left Edge Swipe" SWIPE_EDGE_RIGHT -> "Right Edge Swipe" @@ -57,16 +54,14 @@ class SwipeActivity : KauBaseActivity() { val bg = headerColor.darken(0.2f) container.setBackgroundColor(bg) navigationBarColor = bg - } - - override fun onPostCreate(savedInstanceState: Bundle?) { - super.onPostCreate(savedInstanceState) - kauSwipeOnPostCreate() + kauSwipeOnCreate { + edgeFlag = flag + } } override fun onDestroy() { - super.onDestroy() kauSwipeOnDestroy() + super.onDestroy() } override fun onBackPressed() { |