------------------------------------------------------------------------------
| 1 | | 2 | | 3 | | 4 |
| | | | | | | |
------------------------------------------------------------------------------我想在Layout上主置想同的四个按钮,大小我可以自已指定,控件之间的间隙也可以让我指定该怎么做?我写的XML如下所示,效果却不是我想要的。<TableRow>
<Button
android:id="@+id/1"
android:text="@string/1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"/>
<Button
android:id="@+id/2"
android:layout_height="wrap_content"
android:text="@string/2"
android:layout_width="wrap_content"/>
<Button
android:id="@+id/3"
android:layout_height="wrap_content"
android:text="@string/3"
android:layout_width="wrap_content"/>
<Button
android:id="@+id/4"
android:layout_height="wrap_content"
android:text="@string/4"
android:layout_width="wrap_content"/>
</TableRow>
显示出来的效果是这样,请高手们帮帮忙哦。
------------------------------------------------------------------------------
| 1 | | 2 | | 3 | | 4 |
| | | | | | | |
------------------------------------------------------------------------------
| 1 | | 2 | | 3 | | 4 |
| | | | | | | |
------------------------------------------------------------------------------我想在Layout上主置想同的四个按钮,大小我可以自已指定,控件之间的间隙也可以让我指定该怎么做?我写的XML如下所示,效果却不是我想要的。<TableRow>
<Button
android:id="@+id/1"
android:text="@string/1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"/>
<Button
android:id="@+id/2"
android:layout_height="wrap_content"
android:text="@string/2"
android:layout_width="wrap_content"/>
<Button
android:id="@+id/3"
android:layout_height="wrap_content"
android:text="@string/3"
android:layout_width="wrap_content"/>
<Button
android:id="@+id/4"
android:layout_height="wrap_content"
android:text="@string/4"
android:layout_width="wrap_content"/>
</TableRow>
显示出来的效果是这样,请高手们帮帮忙哦。
------------------------------------------------------------------------------
| 1 | | 2 | | 3 | | 4 |
| | | | | | | |
------------------------------------------------------------------------------
解决方案 »
- 关于ExpandableListView嵌套ExpandableListView的问题
- 请教:NDK怎样使用c++类
- content provider在service中怎么实现?怎么写XML中的provider节点?写在那个分支下面?
- android panel
- android 级联选项问题
- LinearLayout.setLayoutParams(...,...)和FrameLayout.setLayoutParams(...,...)的正常和错误
- 可不可行
- 想要进行android 数据库完成信息注册 有姓名 头像 性别
- 谁能给讲讲Node.JS怎么跟Android配合开发
- 可修改APK强制以平板模式显示吗?
- android ondraw显示不了图形
- 在公司开发Android的几个小问题
你在未设置的时候不可能出现你说的效果
如果想简单的话Linearlayout和RelativeLayout比较好设置