![]() |
酒量大的奔马 · "长江大侠"吕紫剑去世曾 ...· 1 月前 · |
![]() |
谦和的小熊猫 · 疫情期间如何调整适应生活状态?-坪山区人民政府· 2 月前 · |
![]() |
忧郁的大象 · 日本的一号作战计划为什么愚蠢?国军豫湘桂战役 ...· 1 年前 · |
![]() |
爱吹牛的包子 · 华为和苹果狭路相逢为何VR不亮AR亮?_手机新浪网· 2 年前 · |
![]() |
冷冷的牛排 · 我要支持高雅的敖厂长- 哔哩哔哩· 2 年前 · |
当将图像指定为布局的背景时,
将
拉伸到整个布局,但我想使该背景图像在中以
为中心,就像在
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"
![]() |
谦和的小熊猫 · 疫情期间如何调整适应生活状态?-坪山区人民政府 2 月前 |
![]() |
爱吹牛的包子 · 华为和苹果狭路相逢为何VR不亮AR亮?_手机新浪网 2 年前 |
![]() |
冷冷的牛排 · 我要支持高雅的敖厂长- 哔哩哔哩 2 年前 |