From 31f3396450611cbc48714877c46a96a1cf7c9eea Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 7 Aug 2018 11:56:20 +0200 Subject: [PATCH] preload a smaller resolution fullscreen image first --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 3 ++- app/src/main/res/layout/pager_photo_item.xml | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 651520dc2..5d6d1dfbf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -240,9 +240,10 @@ class PhotoFragment : ViewPagerFragment() { Picasso.get() .load(File(medium.path)) .centerInside() - .fit() + .resize(ViewPagerActivity.screenWidth / 2, ViewPagerActivity.screenHeight / 2) .into(view.photo_view, object : Callback { override fun onSuccess() { + view.photo_view.isZoomable = false if (isFragmentVisible) { scheduleZoomableView() } diff --git a/app/src/main/res/layout/pager_photo_item.xml b/app/src/main/res/layout/pager_photo_item.xml index 8d35ed318..96cb2b6c3 100644 --- a/app/src/main/res/layout/pager_photo_item.xml +++ b/app/src/main/res/layout/pager_photo_item.xml @@ -9,8 +9,7 @@ + android:layout_height="match_parent"/>