Close the image fragment only if the image has been dragged down

This commit is contained in:
davidoskky 2023-01-21 16:37:25 +01:00
parent 68bbf5b2d3
commit ddc72d85b0

View File

@ -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