安卓中实现两端对齐,中间fill_parent的方法

来源:互联网 发布:广州淘宝培训汇学好 编辑:程序博客网 时间:2024/06/05 20:03

安卓中实现两端对齐,中间fill_parent的方法

<?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="fill_parent"      android:orientation="horizontal" >        <Button          android:id="@+id/Button01"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="button01" >      </Button>        <TextView          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:layout_weight="1" />        <Button          android:id="@+id/Button02"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="button02" >      </Button>    </LinearLayout>  

 

 

原创粉丝点击