use Down animation at closing fullscreen view with a gesture
This commit is contained in:
parent
34824e79ff
commit
fa41371209
|
@ -7,6 +7,7 @@ import android.view.MotionEvent
|
|||
import androidx.exifinterface.media.ExifInterface
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.gallery.pro.R
|
||||
import com.simplemobiletools.gallery.pro.extensions.config
|
||||
import com.simplemobiletools.gallery.pro.helpers.*
|
||||
import com.simplemobiletools.gallery.pro.models.Medium
|
||||
|
@ -145,7 +146,8 @@ abstract class ViewPagerFragment : Fragment() {
|
|||
|
||||
val downGestureDuration = System.currentTimeMillis() - mTouchDownTime
|
||||
if (!mIgnoreCloseDown && Math.abs(diffY) > Math.abs(diffX) && diffY < -mCloseDownThreshold && downGestureDuration < MAX_CLOSE_DOWN_GESTURE_DURATION && context?.config?.allowDownGesture == true) {
|
||||
activity?.supportFinishAfterTransition()
|
||||
activity?.finish()
|
||||
activity?.overridePendingTransition(0, R.anim.slide_down)
|
||||
}
|
||||
mIgnoreCloseDown = false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue