性感的香槟 · kolla-ansible ...· 6 月前 · |
慷慨的松球 · I cant send keyboard ...· 7 月前 · |
活泼的手术刀 · 通过onnx.helper构建计算图-CSDN博客· 1 年前 · |
斯文的酱肘子 · phpspreadsheet条件格式列A,如 ...· 1 年前 · |
绅士的长颈鹿 · tesseract使用时遇到的坑;Tesse ...· 1 年前 · |
当将图像指定为布局的背景时,
将
拉伸到整个布局,但我想使该背景图像在中以
为中心,就像在
ImageButtons
中那样:
android:scaleType="centerInside"
在
Linear
或
Relative
布局中有实现这一目标的方法吗?
你应该试试..。
1.)以RelativeLayout属性matchParent为例。和centerInparent=true
2.)在it属性WrapContent中取一个WrapContent。现在看一下造币视图的背景或背景。
您可以在LayoutB中使用另一个布局LayoutA。并将宽度和高度设置为wrap_content of LayoutB..and,将图像设置为LayoutB..and的背景,并设置如下所示的分布:
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center"
活泼的手术刀 · 通过onnx.helper构建计算图-CSDN博客 1 年前 |