大图像不适合 android 中的图像视图

Large Image is not fit to image view in android

我正在使用 firebase 创建聊天应用程序,发送大图像消息说图像不适合图像视图帮助我解决下面的代码

<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingTop="8dp">

    <ImageView
        android:id="@+id/image_message_body"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:scaleType="fitXY"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="6dp"
        />
</android.support.constraint.ConstraintLayout>

您可以为高度或宽度设置特定尺寸。我用的是 200 和 100 dp 看你喜欢什么

<ImageView
        android:id="@+id/image_message_body"
         android:layout_width="200dp"  
         android:layout_height="100dp"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:scaleType="fitXY"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="6dp"
        />