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() Picasso.get()
.load(File(medium.path)) .load(File(medium.path))
.centerInside() .centerInside()
.fit() .resize(ViewPagerActivity.screenWidth / 2, ViewPagerActivity.screenHeight / 2)
.into(view.photo_view, object : Callback { .into(view.photo_view, object : Callback {
override fun onSuccess() { override fun onSuccess() {
view.photo_view.isZoomable = false
if (isFragmentVisible) { if (isFragmentVisible) {
scheduleZoomableView() scheduleZoomableView()
} }

View file

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