From 24a0d564d3a9d5c206b0299b690653ec49d63aca Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Wed, 21 Jun 2017 14:12:27 -0700 Subject: Finish slide out --- library/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'library/src/main/kotlin/ca/allanwang') 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, 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) { -- cgit v1.2.3