mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
preload a smaller resolution fullscreen image first
This commit is contained in:
parent
23dd5baaa4
commit
31f3396450
2 changed files with 3 additions and 3 deletions
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue