如何创建一个充满屏幕的ImageView

How to create a filled screen ImageView

我想创建一个看起来像图库或 whatsapp 图片视图的 activity
我希望图像以正常大小显示,并允许用户在 ImageView 内放大和缩小,这样他就可以看到图像的细节(其中将包含文本,所以我需要缩放) 请帮忙,因为我需要这么快

This 库提供缩放 ImageView 秒。

这是我使用的另一个很棒的库。

https://github.com/sephiroth74/ImageViewZoom

只需在 xml 中使用它,而不是像这样的常规 ImageView:

<your_package_name.ImageViewTouch
    android:id="@+id/image_hq"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:adjustViewBounds="true"
    android:contentDescription="@string/image_hq"
    android:scaleType="matrix" />