当前位置: 代码迷 >> Android >> 关于布局的一个小疑点向大家请问上
  详细解决方案

关于布局的一个小疑点向大家请问上

热度:38   发布时间:2016-05-01 12:15:23.0
关于布局的一个小问题向大家请教下
有这么一个表格布局:

我 TableLayout的属性      android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                           android:shrinkColumns="1" 
                            android:stretchColumns="2"
第二个按钮宽度和高度的属性   android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
我想问下,怎么设置让第二列的按钮不随着字体的变长,高度会增加。并且都显示出来。
------解决方案--------------------
android:layout_width="100px"
android:layout_height="200px"
100,200是你自己设定的值
------解决方案--------------------
引用:
有这么一个表格布局:

我 TableLayout的属性      android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                           android:shrinkColumns="1" ……

把参数修改成正好的大小就行了
------解决方案--------------------
建议用相对布局,不要写死了。
  相关解决方案