aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt12
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt7
2 files changed, 11 insertions, 8 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 f052d97..3f25ac3 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
@@ -10,10 +10,7 @@ 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.utils.fullLinearRecycler
-import ca.allanwang.kau.utils.startActivitySlideOut
-import ca.allanwang.kau.utils.toast
-import ca.allanwang.kau.utils.withAlpha
+import ca.allanwang.kau.utils.*
import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter
/**
@@ -36,8 +33,7 @@ class AnimActivity : KauBaseActivity() {
).map { PermissionCheckbox(it) })
adapter.withOnClickListener { _, _, item, _ ->
KL.d("Perm Click")
- kauRequestPermissions(item.permission) {
- granted, _ ->
+ kauRequestPermissions(item.permission) { granted, _ ->
toast("${item.permission} enabled: $granted")
adapter.notifyAdapterDataSetChanged()
}
@@ -54,7 +50,9 @@ class AnimActivity : KauBaseActivity() {
}
override fun onBackPressed() {
- startActivitySlideOut(MainActivity::class.java)
+ startActivity(MainActivity::class.java, bundleBuilder = {
+ withSlideOut(this@AnimActivity)
+ })
}
} \ No newline at end of file
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 482c911..dd81ce1 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -173,7 +173,12 @@ class MainActivity : KPrefActivity() {
}
plainText(R.string.adapter_showcase) {
- onClick = { _, _, _ -> startActivity(AdapterActivity::class.java, transition = true); false }
+ onClick = { _, _, _ ->
+ startActivity(AdapterActivity::class.java, bundleBuilder = {
+ withSceneTransitionAnimation(this@MainActivity)
+ })
+ false
+ }
}
plainText(R.string.kau_about_app) {