Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/342.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在TableLayout中创建空TableRow_Java_Android_Xml_Tablelayout - Fatal编程技术网

Java 如何在TableLayout中创建空TableRow

Java 如何在TableLayout中创建空TableRow,java,android,xml,tablelayout,Java,Android,Xml,Tablelayout,我的andriod应用程序的布局如下 <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/ULC Backgr

我的andriod应用程序的布局如下

<?xml version="1.0" encoding="utf-8"?>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/ULC Background"
android:stretchColumns="1">
    <!--Below I try to create an 'empty' table to push down the buttons 200 pixels, but it doesn't work, it doesn't affect the layout at all-->
    <TableRow android:id="@+id/tableRow3" android:layout_width="fill_parent" android:layout_height="200dip"></TableRow>
    <TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1" android:layout_width="wrap_content">
        <Button android:text="@string/startButtonText" android:layout_width="wrap_content" android:id="@+id/button1" android:layout_height="wrap_content"></Button>
    </TableRow>
    <TableRow android:layout_height="wrap_content" android:id="@+id/tableRow2" android:layout_width="wrap_content">
        <Button android:text="@string/exitButtonText" android:layout_width="wrap_content" android:id="@+id/button2" android:layout_height="wrap_content"></Button>
    </TableRow>
</TableLayout>

按钮在顶部看起来很奇怪,我想把它们往下推200像素,我怎么能做到

我尝试创建一个“空”表格行,但没有成功。

表格行与大多数视图相似,只需使用它即可。

表格行与大多数视图相似,只需使用它即可