安卓控件设置最大宽高
安卓控件设置最大宽高
·
情景:
一张图,在不超过某个尺寸时候,显示原图,超过显示我们限定的大小或者某个控件限定显示大小
android:layout_width=“wrap_content”
android:layout_height=“wrap_content”
android:maxHeight=“90dp”
android:maxWidth=“90dp”
然后
android:maxHeight=“90dp”
android:maxWidth=“90dp”
并没作用
因为少了
android:adjustViewBounds=“true”
完整
更多推荐
已为社区贡献1条内容
所有评论(0)