Close the image fragment only if the image has been dragged down
This commit is contained in:
parent
68bbf5b2d3
commit
ddc72d85b0
@ -46,7 +46,9 @@ class ImageFragment : Fragment() {
|
||||
}
|
||||
|
||||
override fun onTransitionCompleted(motionLayout: MotionLayout?, currentId: Int) {
|
||||
activity?.finish()
|
||||
if (motionLayout?.currentState == binding?.root?.endState) {
|
||||
activity?.finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTransitionTrigger(motionLayout: MotionLayout?, triggerId: Int, positive: Boolean, progress: Float) {
|
||||
|
Loading…
Reference in New Issue
Block a user