我初学android想问一下各位高手:
我想实现如下效果,main.xml布局应该怎么写:
用户名(组件为Textview):需要填写的内容(组件为EditText)
密码(组件为Textview):填写内容(组件为EditText)

解决方案 »

  1.   


    <TableLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:stretchColumns="1" >            <TableRow >                <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="用户名" />                <EditText
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content" />            </TableRow>
                <TableRow >                <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="密码" />                <EditText
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content" />            </TableRow>
    </TableLayout>