<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BtnA" >
</Button>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="BtnB" >
</Button>
</RelativeLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BtnC" >
</Button>
</LinearLayout>
android ImageButton 左中右分段排列
最新推荐文章于 2021-05-26 09:22:19 发布
本文介绍了一个具体的Android布局设计案例,采用LinearLayout与RelativeLayout结合的方式实现按钮的合理排列,并展示了如何使用XML来定义界面布局。
1万+

被折叠的 条评论
为什么被折叠?



