首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 其他相关 >

Layout_一起多列填充父窗口

2012-07-20 
Layout___一行多列填充父窗口?xml version1.0 encodingutf-8?LinearLayoutxmlns:androidhttp:/

Layout___一行多列填充父窗口

<?xml version="1.0" encoding="utf-8"?><LinearLayout    xmlns:android="http://schemas.android.com/apk/res/android"    android:orientation="vertical"    android:layout_width="fill_parent"    android:layout_height="fill_parent">    <TextView        android:layout_width="fill_parent"        android:layout_height="wrap_content"        android:text="@string/hello" />    <!-- use alignLeft to fill the remaining space-->    <RelativeLayout        android:id="@+id/RelativeLayout01"        android:layout_width="wrap_content"        android:layout_height="wrap_content">        <Button            android:id="@+id/TextViewWorkAddress"            android:layout_width="80dp"            android:layout_height="wrap_content"            android:text="80dp">        </Button>        <EditText            android:id="@+id/EditTextWorkAddress"            android:layout_width="fill_parent"            android:layout_height="wrap_content"            android:layout_alignLeft="@+id/TextViewWorkAddress"            android:layout_marginLeft="80dp"            android:text="The remaining space">        </EditText>    </RelativeLayout>    <!-- use toRightOf to fill the remaining space-->    <RelativeLayout        android:id="@+id/RelativeLayout01"        android:layout_width="wrap_content"        android:layout_height="wrap_content">        <Button            android:id="@+id/TextViewWorkEmail"            android:layout_width="80dp"            android:layout_height="wrap_content"            android:text="80dp">        </Button>        <EditText            android:id="@+id/EditTextWorkEmail"            android:layout_width="fill_parent"            android:layout_height="wrap_content"            android:layout_toRightOf="@+id/TextViewWorkEmail"            android:text="The remaining space">        </EditText>    </RelativeLayout>    <RelativeLayout        android:layout_width="wrap_content"        android:layout_height="wrap_content">        <Button            android:layout_width="fill_parent"            android:layout_height="wrap_content"            android:layout_marginRight="80dp"            android:text="The remaining space">        </Button>        <Button            android:layout_width="80dp"            android:layout_height="wrap_content"            android:layout_alignParentRight="true"            android:text="80dp">        </Button>    </RelativeLayout></LinearLayout>

热点排行