gpt4 book ai didi

android - 在 View 底部绘制按钮

转载 作者:行者123 更新时间:2023-11-29 22:29:21 26 4
gpt4 key购买 nike

嗨!!

我想在按钮处有一个按钮,并以线性布局的 View 为中心。

非工作示例:

<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:id="@+id/login_btnew" android:text="Make a new Account"></Button>

解决方案?

谢谢

最佳答案

您可能想尝试以下 RelativeLayout

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent">


<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:id="@+id/login_btnew"
android:text="Make a new Account"></Button>

</RelativeLayout>

关于android - 在 View 底部绘制按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4782641/

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