TableLayout 布局的修改

fengyoujie 2011-12-20 02:44:47
请教各位。下面的布局如何修改TabLayout必须使用。

<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:stretchColumns="0">
<TableRow>
<EditText android:layout_width="200dp"
android:layout_height="40dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="昵称"/>
</TableRow>


<TableRow>
<TextView
android:layout_height="wrap_content"
android:text="称谓"
android:layout_width="50dp"
android:background="#ff00ff00"
/>

<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/RadioButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="先生"/>
<RadioButton
android:id="@+id/RadioButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="女士"
/>
</RadioGroup>
</TableRow>


上面这段xml我想实现一个表格。第一行的第一列长是200dip。
第二行的第一列长50dip。怎么实现? 上面的这段代码的第一行,和第二行的列都显示相同的宽度。
多谢了。!
...全文
134 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

80,350

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧