aboutsummaryrefslogtreecommitdiff
path: root/library/src/main
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-21 14:12:27 -0700
committerAllan Wang <me@allanwang.ca>2017-06-21 14:12:27 -0700
commit24a0d564d3a9d5c206b0299b690653ec49d63aca (patch)
tree678c2f06adc162bee354df5b8c001791b96563e0 /library/src/main
parentc58df447ebea1408b33209098851557847e6c652 (diff)
downloadkau-24a0d564d3a9d5c206b0299b690653ec49d63aca.tar.gz
kau-24a0d564d3a9d5c206b0299b690653ec49d63aca.tar.bz2
kau-24a0d564d3a9d5c206b0299b690653ec49d63aca.zip
Finish slide out
Diffstat (limited to 'library/src/main')
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt5
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) {