Skip to content

Commit

Permalink
Minor viewer improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jahirfiquitiva committed Mar 28, 2020
1 parent 97d61ca commit 1f13e9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ open class ViewerActivity : BaseFavoritesConnectedActivity<Prefs>() {
}

setupInitialZoom()
image?.setOnClickListener { toggleSystemUI() }
(image as? PhotoView)?.setOnPhotoTapListener { _, _, _ -> toggleSystemUI() }
?: image?.setOnClickListener { toggleSystemUI() }
image?.loadFramesPic(wallpaper.url, wallpaper.thumbnail, null, true) { generatePalette(it) }

setSupportActionBar(toolbar)
Expand Down Expand Up @@ -138,15 +139,14 @@ open class ViewerActivity : BaseFavoritesConnectedActivity<Prefs>() {
override fun onEnterAnimationComplete() {
super.onEnterAnimationComplete()
setupInitialZoom()
findViewById<View?>(R.id.loading)?.gone()
}

private fun setupInitialZoom() {
(image as? PhotoView)?.let {
it.post {
it.minimumScale = 1F
it.maximumScale = 2.5F
it.scale = 1F
it.setScale(1F, true)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions library/src/main/res/layout/item_wallpaper_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

Expand All @@ -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" />

Expand Down

0 comments on commit 1f13e9d

Please sign in to comment.