`
pan_这名还行
  • 浏览: 42662 次
  • 性别: Icon_minigender_1
  • 来自: 郑州
社区版块
存档分类
最新评论

TableLayout常用细节

阅读更多
列号为1的列收缩
android:shrinkColumns="1"

列号为2的列扩展
android:stretchColumns="2"

表明列号
android:layout_column="1"

合并列
android:layout_span="2"


示例:
<TableLayout
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:stretchColumns="1"
>
	<TableRow>
		<TextView				
		   	android:layout_width="wrap_content" 
		   	android:layout_height="wrap_content" 
		   	android:text="username"
		/>	
	   <EditText 
	   		android:layout_column="1"
		   	android:layout_width="wrap_content" 
		   	android:layout_height="wrap_content" 
		   	/>	
	</TableRow>
	<TableRow>
		<Button
	   		android:layout_span="2"
		   	android:layout_width="wrap_content" 
		   	android:layout_height="wrap_content"
		   	android:text="button"
		   	android:layout_gravity="center"
		/>
	</TableRow>
</TableLayout>


没找到合并行的方法,继续学习...
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics