我需要类似<img width="100%" />
Android 的东西<ImageView>
。我的意思是将宽度调整为所有可用空间(缩小或放大图像宽度)并自动更改高度以保持纵横比。
Something like <ImageView android:layout_width="match_parent" android:layout_height="auto">
使用android:scaleType="fitCenter"
我想要的图像,但仅使用图像,不会改变视图本身的高度。当我将展位尺寸设置为 match_parent 时,我会得到我想要的,但前提是我在屏幕上只有一张图像。但我需要一些图片下的文字。
这是创建 ImageView 的子项的唯一方法吗?例如android:adjustViewBounds="true"
不为我做任何事情。