<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" > <TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
> <TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <TextView
android:id="@+id/logintab_ipaddress_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/login_tab_iplabel"
android:width="100dp" /> <EditText
android:id="@+id/logintab_ipaddress_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text" >
</EditText>
</LinearLayout>
</TableRow> <TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <TextView
android:id="@+id/logintab_portnumber_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/login_tab_portlabel"
android:width="100dp" /> <EditText
android:id="@+id/logintab_portnumber_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text" >
</EditText>
</LinearLayout>
</TableRow> <TableRow
android:id="@+id/tableRow3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <Button
android:id="@+id/login_tab_submitbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="@string/login_tab_submitbutton_str"
android:width="100dp" /> <Button
android:id="@+id/login_tab_resetbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:text="@string/login_tab_resetbutton_str"
android:width="100dp" />
</LinearLayout>
</TableRow>
</TableLayout></RelativeLayout>Androidrelativelayout布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" > <TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
> <TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <TextView
android:id="@+id/logintab_ipaddress_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/login_tab_iplabel"
android:width="100dp" /> <EditText
android:id="@+id/logintab_ipaddress_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text" >
</EditText>
</LinearLayout>
</TableRow> <TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <TextView
android:id="@+id/logintab_portnumber_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/login_tab_portlabel"
android:width="100dp" /> <EditText
android:id="@+id/logintab_portnumber_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text" >
</EditText>
</LinearLayout>
</TableRow> <TableRow
android:id="@+id/tableRow3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <Button
android:id="@+id/login_tab_submitbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="@string/login_tab_submitbutton_str"
android:width="100dp" /> <Button
android:id="@+id/login_tab_resetbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:text="@string/login_tab_resetbutton_str"
android:width="100dp" />
</LinearLayout>
</TableRow>
</TableLayout></RelativeLayout>Androidrelativelayout布局
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货