gpt4 book ai didi

Android - RelativeLayout - 在图像的中心放置一个复选框

转载 作者:行者123 更新时间:2023-11-30 03:39:50 25 4
gpt4 key购买 nike

我想知道如何在我的 RelativeLayout View 中将复选框置于图像的中心 - 没有这样的属性..

这是我的代码:

http://pastebin.com/tGAxju3Z

请注意:图像比复选框大。

最佳答案

为以下内容使用FrameLayout

<FrameLayout 
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/image1"
>

<Button
android:id="@+id/button2"
android:layout_gravity="center"
android:src="@drawable/image2" />

</FrameLayout>

关于Android - RelativeLayout - 在图像的中心放置一个复选框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15956030/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com