From e1aa3cc9954787339e894043bd2d46634108e0ba Mon Sep 17 00:00:00 2001 From: Ivan Kupalov Date: Sat, 18 Jan 2020 12:12:37 +0100 Subject: [PATCH] Enable zooming and panning in the CaptionDialog (#1643) --- .../tusky/components/compose/dialog/CaptionDialog.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/CaptionDialog.kt b/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/CaptionDialog.kt index e7cc36cb..d594601c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/CaptionDialog.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/CaptionDialog.kt @@ -24,7 +24,6 @@ import android.text.InputType import android.util.DisplayMetrics import android.view.WindowManager import android.widget.EditText -import android.widget.ImageView import android.widget.LinearLayout import android.widget.Toast import androidx.appcompat.app.AlertDialog @@ -34,6 +33,7 @@ import at.connyduck.sparkbutton.helpers.Utils import com.bumptech.glide.Glide import com.bumptech.glide.request.target.CustomTarget import com.bumptech.glide.request.transition.Transition +import com.github.chrisbanes.photoview.PhotoView import com.keylesspalace.tusky.R import com.keylesspalace.tusky.util.withLifecycleContext @@ -50,7 +50,7 @@ fun T.makeCaptionDialog(existingDescription: String?, dialogLayout.setPadding(padding, padding, padding, padding) dialogLayout.orientation = LinearLayout.VERTICAL - val imageView = ImageView(this) + val imageView = PhotoView(this) val displayMetrics = DisplayMetrics() windowManager.defaultDisplay.getMetrics(displayMetrics)