android 图片填充整个布局,【android布局】ImageView 中 让图片拉伸
初学安卓,做一个东西的时候,用weight分成两列之后,ImageView填充图片的时候发现不能拉伸,有空隙看着挺难看的。发现有一个属性是用来拉伸图片的:直接上代码android:layout_width="wrap_content"android:layout_height="80dp">android:scaleType="fitXY"android:layout_width="wrap
·
初学安卓,做一个东西的时候,用weight分成两列之后,ImageView填充图片的时候发现不能拉伸,有空隙看着挺难看的。
发现有一个属性是用来拉伸图片的:
直接上代码
android:layout_width="wrap_content"
android:layout_height="80dp">
android:scaleType="fitXY"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:src="@drawable/i5"/>
android:scaleType="fitXY"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:src="@drawable/i6"/>
更多推荐
已为社区贡献3条内容
所有评论(0)