aboutsummaryrefslogtreecommitdiff
path: root/core-ui/src/main/kotlin/ca/allanwang
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-23 23:26:34 -0700
committerGitHub <noreply@github.com>2017-07-23 23:26:34 -0700
commit50ad7f0ae89fc52ce57fe03328f4221fb57f2eac (patch)
tree69ead8807bb7371428953a0363519343f03f9b5b /core-ui/src/main/kotlin/ca/allanwang
parent4706b8f6a8d08a6961da6ab34d15881b63356d79 (diff)
downloadkau-50ad7f0ae89fc52ce57fe03328f4221fb57f2eac.tar.gz
kau-50ad7f0ae89fc52ce57fe03328f4221fb57f2eac.tar.bz2
kau-50ad7f0ae89fc52ce57fe03328f4221fb57f2eac.zip
Fully implement imagepicker and create play store showcase (#12)3.1.1
* Update changelog * Add uri to imagemodel * Revamp image pickers * Prepare play store showcase * Add encrypted files * Test showcase * Clean elastic recycler activity
Diffstat (limited to 'core-ui/src/main/kotlin/ca/allanwang')
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/MeasuredImageView.kt1
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt14
2 files changed, 14 insertions, 1 deletions
diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/MeasuredImageView.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/MeasuredImageView.kt
index ebb6397..5db5eaa 100644
--- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/MeasuredImageView.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/MeasuredImageView.kt
@@ -3,7 +3,6 @@ package ca.allanwang.kau.ui.views
import android.content.Context
import android.support.v7.widget.AppCompatImageView
import android.util.AttributeSet
-import android.widget.ImageView
/**
* Created by Allan Wang on 2017-07-14.
diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
index 995ccab..5cdfc92 100644
--- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
@@ -21,9 +21,12 @@ import android.content.Context
import android.graphics.Color
import android.os.Build
import android.support.annotation.RequiresApi
+import android.support.v7.widget.RecyclerView
+import android.transition.TransitionInflater
import android.util.AttributeSet
import android.view.View
import android.widget.FrameLayout
+import ca.allanwang.kau.logging.KL
import ca.allanwang.kau.ui.R
import ca.allanwang.kau.utils.*
@@ -237,4 +240,15 @@ class ElasticDragDismissFrameLayout @JvmOverloads constructor(
}
}
+ fun addExitListener(activity: Activity, transitionBottom: Int = R.transition.kau_exit_slide_bottom, transitionTop: Int = R.transition.kau_exit_slide_top) {
+ addListener(object : ElasticDragDismissFrameLayout.SystemChromeFader(activity) {
+ override fun onDragDismissed() {
+ KL.d("New transition")
+ activity.window.returnTransition = TransitionInflater.from(activity)
+ .inflateTransition(if (translationY > 0) transitionBottom else transitionTop)
+ activity.finishAfterTransition()
+ }
+ })
+ }
+
}