move magic numbers to value objects

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-05-18 18:23:33 +02:00
parent ffdffe1c9e
commit d923a41696
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B

View File

@ -45,6 +45,9 @@ class FullScreenImageActivity : AppCompatActivity() {
private var showFullscreen = false
private val maxScale = 6.0f
private val mediumScale = 2.45f
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
menuInflater.inflate(R.menu.menu_preview, menu)
return true
@ -93,8 +96,8 @@ class FullScreenImageActivity : AppCompatActivity() {
// Enable enlarging the image more than default 3x maximumScale.
// Medium scale adapted to make double-tap behaviour more consistent.
binding.photoView.maximumScale = 6.0f
binding.photoView.mediumScale = 2.45f
binding.photoView.maximumScale = maxScale
binding.photoView.mediumScale = mediumScale
val fileName = intent.getStringExtra("FILE_NAME")
val isGif = intent.getBooleanExtra("IS_GIF", false)