From 1f13e9d380dd52471d78ea3ff3aebc41b0eb6fcc Mon Sep 17 00:00:00 2001 From: Jahir Fiquitiva Date: Sat, 28 Mar 2020 12:19:08 -0500 Subject: [PATCH] Minor viewer improvements --- .../kotlin/dev/jahir/frames/ui/activities/ViewerActivity.kt | 6 +++--- library/src/main/res/layout/item_wallpaper_detail.xml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/src/main/kotlin/dev/jahir/frames/ui/activities/ViewerActivity.kt b/library/src/main/kotlin/dev/jahir/frames/ui/activities/ViewerActivity.kt index fedf894f8..843853aaa 100644 --- a/library/src/main/kotlin/dev/jahir/frames/ui/activities/ViewerActivity.kt +++ b/library/src/main/kotlin/dev/jahir/frames/ui/activities/ViewerActivity.kt @@ -103,7 +103,8 @@ open class ViewerActivity : BaseFavoritesConnectedActivity() { } setupInitialZoom() - image?.setOnClickListener { toggleSystemUI() } + (image as? PhotoView)?.setOnPhotoTapListener { _, _, _ -> toggleSystemUI() } + ?: image?.setOnClickListener { toggleSystemUI() } image?.loadFramesPic(wallpaper.url, wallpaper.thumbnail, null, true) { generatePalette(it) } setSupportActionBar(toolbar) @@ -138,7 +139,6 @@ open class ViewerActivity : BaseFavoritesConnectedActivity() { override fun onEnterAnimationComplete() { super.onEnterAnimationComplete() setupInitialZoom() - findViewById(R.id.loading)?.gone() } private fun setupInitialZoom() { @@ -146,7 +146,7 @@ open class ViewerActivity : BaseFavoritesConnectedActivity() { it.post { it.minimumScale = 1F it.maximumScale = 2.5F - it.scale = 1F + it.setScale(1F, true) } } } diff --git a/library/src/main/res/layout/item_wallpaper_detail.xml b/library/src/main/res/layout/item_wallpaper_detail.xml index 2104aff3c..acf3cd8af 100644 --- a/library/src/main/res/layout/item_wallpaper_detail.xml +++ b/library/src/main/res/layout/item_wallpaper_detail.xml @@ -18,7 +18,7 @@ android:layout_marginRight="24dp" android:layout_weight="1" android:ellipsize="end" - android:maxLines="1" + android:maxLines="2" android:textColor="?colorOnSurface" tools:text="Dimensions" /> @@ -29,7 +29,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:ellipsize="end" - android:maxLines="1" + android:maxLines="3" android:textColor="?colorOnSurface" tools:text="3200x2560" />