mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-20 05:50:36 +01:00
use Subsampling at a couple more image formats
This commit is contained in:
parent
f7deafb2dc
commit
576f2a431a
@ -186,7 +186,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun addZoomableView() {
|
private fun addZoomableView() {
|
||||||
if ((medium.isJpg() || medium.isPng()) && isMenuVisible && view.subsampling_view.visibility == View.GONE) {
|
if ((medium.isImage()) && isMenuVisible && view.subsampling_view.visibility == View.GONE) {
|
||||||
view.subsampling_view.apply {
|
view.subsampling_view.apply {
|
||||||
beVisible()
|
beVisible()
|
||||||
setDoubleTapZoomScale(1.4f)
|
setDoubleTapZoomScale(1.4f)
|
||||||
|
@ -20,8 +20,6 @@ data class Medium(val name: String, var path: String, val isVideo: Boolean, val
|
|||||||
|
|
||||||
fun isGif() = path.isGif()
|
fun isGif() = path.isGif()
|
||||||
|
|
||||||
fun isJpg() = !isPng() && !isGif()
|
|
||||||
|
|
||||||
fun isImage() = !isGif() && !isVideo
|
fun isImage() = !isGif() && !isVideo
|
||||||
|
|
||||||
fun getMimeType() = File(path).getMimeType()
|
fun getMimeType() = File(path).getMimeType()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user