preload a smaller resolution fullscreen image first

This commit is contained in:
tibbi 2018-08-07 11:56:20 +02:00
parent 23dd5baaa4
commit 31f3396450
2 changed files with 3 additions and 3 deletions

View File

@ -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()
}

View File

@ -9,8 +9,7 @@
<com.github.chrisbanes.photoview.PhotoView
android:id="@+id/photo_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"/>
android:layout_height="match_parent"/>
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
android:id="@+id/subsampling_view"