diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-23 23:26:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-23 23:26:34 -0700 |
commit | 50ad7f0ae89fc52ce57fe03328f4221fb57f2eac (patch) | |
tree | 69ead8807bb7371428953a0363519343f03f9b5b /core-ui | |
parent | 4706b8f6a8d08a6961da6ab34d15881b63356d79 (diff) | |
download | kau-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')
3 files changed, 17 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() + } + }) + } + } diff --git a/core-ui/src/main/res-public/values/styles.xml b/core-ui/src/main/res-public/values/styles.xml index 583ede7..31c5b74 100644 --- a/core-ui/src/main/res-public/values/styles.xml +++ b/core-ui/src/main/res-public/values/styles.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="no"?> <resources> + <style name="Kau.Translucent"> <item name="android:windowBackground">@color/kau_shadow_overlay</item> <item name="android:colorBackgroundCacheHint">@null</item> @@ -13,6 +14,8 @@ <item name="android:windowAnimationStyle">@null</item> </style> + <!--Transitions are only v21+--> + <style name="Kau.Translucent.SlideBottom" /> <style name="Kau.Translucent.SlideTop" /> |