diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-21 14:12:27 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-21 14:12:27 -0700 |
commit | 24a0d564d3a9d5c206b0299b690653ec49d63aca (patch) | |
tree | 678c2f06adc162bee354df5b8c001791b96563e0 | |
parent | c58df447ebea1408b33209098851557847e6c652 (diff) | |
download | kau-24a0d564d3a9d5c206b0299b690653ec49d63aca.tar.gz kau-24a0d564d3a9d5c206b0299b690653ec49d63aca.tar.bz2 kau-24a0d564d3a9d5c206b0299b690653ec49d63aca.zip |
Finish slide out
-rw-r--r-- | library/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/library/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt b/library/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt index 4db63d2..1499c9f 100644 --- a/library/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt +++ b/library/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt @@ -61,6 +61,11 @@ fun Context.startActivitySlideOut(clazz: Class<out Activity>, clearStack: Boolea startActivity(clazz, clearStack, intentBuilder, bundle) } +fun Activity.finishSlideOut() { + finish() + overridePendingTransition(R.anim.kau_fade_in, R.anim.kau_slide_out_right_top) +} + var Activity.navigationBarColor: Int get() = if (buildIsLollipopAndUp) window.navigationBarColor else Color.BLACK set(value) { |