small photofragment update

This commit is contained in:
tibbi 2017-01-06 16:56:37 +01:00
parent c564e63135
commit ccf71496e2

View file

@ -62,7 +62,7 @@ class PhotoFragment : ViewPagerFragment() {
return false return false
} }
override fun onResourceReady(resource: Bitmap?, model: String?, target: Target<Bitmap>?, isFromMemoryCache: Boolean, isFirstResource: Boolean): Boolean { override fun onResourceReady(bitmap: Bitmap?, model: String?, target: Target<Bitmap>?, isFromMemoryCache: Boolean, isFirstResource: Boolean): Boolean {
addZoomableView() addZoomableView()
return false return false
} }
@ -72,8 +72,8 @@ class PhotoFragment : ViewPagerFragment() {
private fun addZoomableView() { private fun addZoomableView() {
if (!medium.isPng()) { if (!medium.isPng()) {
subsamplingView.visibility = View.VISIBLE
subsamplingView.apply { subsamplingView.apply {
visibility = View.VISIBLE
setDoubleTapZoomScale(1.2f) setDoubleTapZoomScale(1.2f)
setImage(ImageSource.uri(medium.path)) setImage(ImageSource.uri(medium.path))
orientation = SubsamplingScaleImageView.ORIENTATION_USE_EXIF orientation = SubsamplingScaleImageView.ORIENTATION_USE_EXIF