繁体   English   中英

使用PhotoView放大后无法获得原始尺寸的图像

[英]Can't get to original size of image after zooming in using a PhotoView

我使用Chris Bane的PhotoView来显示ImageViews。 放大后,我无法缩小图像的原始尺寸。 看起来边界太小了,但还有其他解释吗?

xml photoview设置:

    <com.github.chrisbanes.photoview.PhotoView
        android:id = "@+id/ScreenshotPhotoView"
        android:src = "@drawable/LogoImg"
        android:layout_marginTop = "40dp"
        android:layout_marginBottom = "40dp"
        android:layout_width="320dp"
        android:layout_height="180dp"
        android:layout_gravity = "center_horizontal"
        android:scaleType = "fitCenter"
    />

似乎问题是我将layout_widthlayout_height属性设置为特定值(320x180)。 通过更改为warp_contentmatch_parent来解决。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM