From d923a416960abf0ff775052e75b5d2593698579d Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Tue, 18 May 2021 18:23:33 +0200 Subject: [PATCH] move magic numbers to value objects Signed-off-by: Andy Scherzinger --- .../nextcloud/talk/activities/FullScreenImageActivity.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/activities/FullScreenImageActivity.kt b/app/src/main/java/com/nextcloud/talk/activities/FullScreenImageActivity.kt index 4b1410d28..84627275d 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/FullScreenImageActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/activities/FullScreenImageActivity.kt @@ -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)