永发信息网

如何设置格式中RelativeLayout到中心对齐的按钮

答案:1  悬赏:10  手机版
解决时间 2021-10-17 04:55
  • 提问者网友:做自己de王妃
  • 2021-10-16 10:07
如何设置格式中RelativeLayout到中心对齐的按钮
最佳答案
  • 五星知识达人网友:从此江山别
  • 2021-04-24 16:25
假设你想要两个 Button s 以 50%的屏幕上,你可以把他们放 LinearLayout 和给他们每人相同 weight 。喜欢的东西
<LinearLayout
...
>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯