Android : Dynamic TableLayout

女生的网名这么多〃 提交于 2019-12-07 13:30:27

You have a stray TextView in your layout.

    <TableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/lastExpensesTable">
        <TableRow
            android:id="@+id/lastExpensesTableRow"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <!-- first column -->
            <TextView
                android:id="@+id/lastExpensesTableName"
                android:text="@string/last_expenses_table_name"/>
            <!-- second column -->
            <TextView />
            <!-- third column -->
            <TextView
                android:id="@+id/lastExpensesTableAmount"
                android:text="@string/last_expenses_table_amount"/>
        </TableRow>
    </TableLayout>

Take out that TextView marked "second column" and you're all set.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!