Android开发之RelativeLayout和RableLayout
这几天学习andriod的布局,总体感觉,linearLayout和TableLayout都相对简单一点,而RelativeLayout稍微复杂一点,所以贴出来让大家看看,如下是布局图
如下是main.xml文件的内容<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?><TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:stretchColumns="1" > <TableRow> <TextView android:text="URL" /> <EditText android:id="@+id/entry" android:layout_span="3" /> </TableRow> <View android:layout_height="2px" android:background="#0000FF" /> <TableRow> <Button android:id="@+id/cancel2" android:text="Cancel" android:layout_column="2" /> <Button android:id="@+id/ok2" android:text="OK" /> </TableRow></TableLayout>