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