我正在尝试构建和显示有组织的数据的应用程序,所以我认为基本上TableLayout
是一个好主意,只是将它们保持在行中,所以我想知道正确的方法是什么?我的xml中有这个
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableRow>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello" >
</TextView>
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="233dp"
android:layout_marginTop="44dp" >
</ListView>
</TableRow>
</TableLayout>
</LinearLayout>
那么只是TableLayout
标签和TableRow
标签显示一个警告,上面写着:
"This TableLayout layout or its LinearLayout parent is possibly useless"
所以我的理解是没有拿起TableLayout
. 我怎样才能解决这个问题?还有其他方法可以轻松做到这一点吗?