[英]Android must have Expandableview whose id is
Your content must have a ExpandableView whose id is attribute is 'android.R.list'
您的内容必须具有一个ID为属性为'android.R.list'的ExpandableView。
This is the error message I am getting from Logcat. 这是我从Logcat得到的错误消息。 Which is confusing me as my XML is this
这让我感到困惑,因为我的XML是
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ExpandableListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
try this 尝试这个
<ExpandableListView
android:id="@id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
ExpandableListView ExpandableListView
when you define id like this @+id/list means that you define an id name list in your application namespace and you can refer to it by @id/list , but @android:id/list means that you are referring to an id define in the android namespace This namespace is the namespace of the framework 当您像这样定义id时,@ + id / list表示您在应用程序名称空间中定义了一个id名称列表,并且可以通过@ id / list引用它,但是@android:id / list表示您正在引用一个id在android名称空间中定义此名称空间是框架的名称空间
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.