【发布时间】:2014-07-14 02:55:15
【问题描述】:
尝试了我在网上可以阅读的所有内容,但无济于事。在此 fragment_main.xml 代码上出现上述错误。我想用线性布局中的一些文本创建一个简单的列表视图。请指出错误。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/selection"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ff0000cc"
android:textStyle="bold“ />
</TextView>
<ListView android:id="@android:id:listView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false">
</ListView>
<TextView android:id="@android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Empty set"/>
</TextView>
</LinearLayout>
【问题讨论】: