Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.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
Android studio Android Studio表格布局如何_Android Studio_Android Tablelayout - Fatal编程技术网

Android studio Android Studio表格布局如何

Android studio Android Studio表格布局如何,android-studio,android-tablelayout,Android Studio,Android Tablelayout,我是android应用程序开发新手。我正在尝试制作一个应用程序来显示我的日常课程。我已经做了75%的申请,但我被困在最后的25%。我就是做不出像图中那样的桌子。请帮帮我 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientat

我是android应用程序开发新手。我正在尝试制作一个应用程序来显示我的日常课程。我已经做了75%的申请,但我被困在最后的25%。我就是做不出像图中那样的桌子。请帮帮我

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/gray">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:background="@color/gray"
    android:orientation="vertical"
    android:layout_marginTop="10dp">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

<TableLayout
    android:layout_width="20dp"
    android:layout_height="20dp"
    android:background="@color/gray"
    android:orientation="horizontal"
    android:layout_marginLeft="10dp"
    android:layout_marginRight="10dp">

    <TableRow
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@mipmap/bus" />
    </TableRow>

</TableLayout>

<TableLayout
    android:id="@+id/origen"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@color/gray"
    android:orientation="vertical">
 <TableRow
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <TextView
        android:id="@+id/tv_ponit_origdin"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="Tapo"
        android:textSize="10sp"
        android:textColor="@color/white"/>
 </TableRow>

    <TableRow>

        <TextView
            android:id="@+id/tv_ponit_origin"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="Ciudad de Mexico"
            android:textSize="10sp"
            android:textColor="@color/white"/>
    </TableRow>
</TableLayout>

<android.support.v4.widget.Space
    android:layout_width="15dp"
    android:layout_height="0dp" />
<TableRow
    android:layout_width="20dp"
    android:layout_height="20dp"
    android:orientation="horizontal">

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:src="@mipmap/transfer" />
</TableRow>

<android.support.v4.widget.Space
    android:layout_width="15dp"
    android:layout_height="0dp" />
<TableLayout
    android:layout_width="20dp"
    android:layout_height="20dp"
    android:background="@color/gray"
    android:orientation="horizontal"
    android:layout_marginRight="10dp">

    <TableRow
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@mipmap/bus" />
    </TableRow>
</TableLayout>
<TableLayout
    android:id="@+id/destino"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@color/gray"
    android:orientation="vertical">
    <TableRow
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:orientation="vertical">
        <TextView
            android:id="@+id/tv_ponit_destino"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="Veracruz"
            android:textSize="10sp"
            android:textColor="@color/white"/>
    </TableRow>

    <TableRow>

        <TextView
            android:id="@+id/tv_ponit_two_destino"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="Veracruz, Ver."
            android:textSize="10sp"
            android:textColor="@color/white"/>
    </TableRow>
</TableLayout>


<android.support.v4.widget.Space
    android:layout_width="15dp"
    android:layout_height="0dp" />


<TableRow
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <TextView
        android:id="@+id/tv_departure_time"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:textSize="20sp"
        android:text="12:00"
        android:gravity="center"
        android:textColor="@color/white"/>
</TableRow>
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:layout_marginTop="5dp">

    <TableLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <TableRow
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginLeft="20dp">

            <TextView
                android:id="@+id/tv_inf_exit"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:textColor="@color/white"
                android:text="Salida:"
                android:textSize="10sp"
                android:layout_marginRight="5dp"/>


            <TextView
                android:id="@+id/tv_exit"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:text="02 Mar 2017"
                android:textColor="@color/white"
                android:gravity="center"
                android:textSize="10sp"
                android:layout_marginRight="30dp"/>

            <TextView
                android:id="@+id/tv_inf_places_sold"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="@string/plases_sold"
                android:textColor="@color/white"
                android:textSize="10sp"
                android:layout_marginRight="5dp"/>

            <TextView
                android:id="@+id/tv_places_sold"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="42"
                android:textColor="@color/white"
                android:textSize="10sp"
                android:layout_marginRight="30dp"/>

            <TextView
                android:id="@+id/tv_info_race_number"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="@string/race_number"
                android:textColor="@color/white"
                android:textSize="10sp"
                android:layout_marginRight="5dp"/>

            <TextView
                android:id="@+id/tv_race_number"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="20000"
                android:textColor="@color/white"
                android:textSize="10sp" />

        </TableRow>
    </TableLayout>
</LinearLayout>
    </LinearLayout>



我遇到了一个与您类似的问题,我做到了,我希望它能为您解决。

嗨,Utsav,您在表格单元格EditText或textView中需要什么?您想在我们的表格单元格中只显示文本视图吗?这两张图片没有差异的原因是什么?请在顶部描述代码的操作。