mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
do not use lower resolution images at fullscreen view before adding the zoomable
This commit is contained in:
parent
8eeac63686
commit
d590ac2dc2
1 changed files with 1 additions and 9 deletions
|
@ -274,14 +274,6 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loadBitmap(degrees: Int = 0) {
|
private fun loadBitmap(degrees: Int = 0) {
|
||||||
var targetWidth = ViewPagerActivity.screenWidth
|
|
||||||
var targetHeight = ViewPagerActivity.screenHeight
|
|
||||||
|
|
||||||
if (context?.config?.allowZoomingImages == true) {
|
|
||||||
targetWidth = (targetWidth * 0.8).toInt()
|
|
||||||
targetHeight = (targetHeight * 0.8).toInt()
|
|
||||||
}
|
|
||||||
|
|
||||||
var pathToLoad = if (medium.path.startsWith("content://")) medium.path else "file://${medium.path}"
|
var pathToLoad = if (medium.path.startsWith("content://")) medium.path else "file://${medium.path}"
|
||||||
pathToLoad = pathToLoad.replace("%", "%25").replace("#", "%23")
|
pathToLoad = pathToLoad.replace("%", "%25").replace("#", "%23")
|
||||||
|
|
||||||
|
@ -289,7 +281,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
val picasso = Picasso.get()
|
val picasso = Picasso.get()
|
||||||
.load(pathToLoad)
|
.load(pathToLoad)
|
||||||
.centerInside()
|
.centerInside()
|
||||||
.resize(targetWidth, targetHeight)
|
.resize(ViewPagerActivity.screenWidth, ViewPagerActivity.screenHeight)
|
||||||
|
|
||||||
if (degrees != 0) {
|
if (degrees != 0) {
|
||||||
picasso.rotate(degrees.toFloat())
|
picasso.rotate(degrees.toFloat())
|
||||||
|
|
Loading…
Reference in a new issue