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