aboutsummaryrefslogtreecommitdiff
path: root/sample/src
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-05 21:17:03 -0700
committerAllan Wang <me@allanwang.ca>2017-07-05 21:17:03 -0700
commit82a98786f301cd8e7fcafc44bf760f0434bd2eb2 (patch)
treefee179c415d719123cadb494bb84c2d5785a5657 /sample/src
parent9bc520fc9041fed26ef965ef2420a0552ccc20d6 (diff)
downloadkau-82a98786f301cd8e7fcafc44bf760f0434bd2eb2.tar.gz
kau-82a98786f301cd8e7fcafc44bf760f0434bd2eb2.tar.bz2
kau-82a98786f301cd8e7fcafc44bf760f0434bd2eb2.zip
Bring back swipe
Diffstat (limited to 'sample/src')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt63
1 files changed, 60 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 dd95b18..8ccaded 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
@@ -7,7 +7,10 @@ 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.*
+import ca.allanwang.kau.swipe.SWIPE_EDGE_TOP
+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
@@ -27,19 +30,73 @@ class AnimActivity : AppCompatActivity() {
setContentView(fullLinearRecycler(adapter))
adapter.add(listOf(
PERMISSION_ACCESS_COARSE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_ACCESS_FINE_LOCATION,
PERMISSION_ACCESS_FINE_LOCATION
).map { PermissionCheckbox(it) })
adapter.withOnClickListener { _, _, item, _ ->
KL.d("Perm Click")
kauRequestPermissions(item.permission) {
- granted, deniedPerm ->
+ granted, _ ->
toast("${item.permission} enabled: $granted")
adapter.notifyAdapterDataSetChanged()
}
true
}
kauSwipeOnCreate {
- edgeFlag = SWIPE_EDGE_ALL
+ edgeFlag = SWIPE_EDGE_TOP
}
}