一个应用程序使用ExpandableListActivity,根据该文档,ExpandableListView的用法是标准的:
<ExpandableListView
android:id="@id/android:list"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:divider="@android:color/transparent"
android:dividerHeight="5dip"
android:layout_marginTop="10dip">
</ExpandableListView>
Android Studio 3.2具有以下警告:
我如何摆脱警告?
最佳答案
这可能是拼写错误。更改为:
"@android:id/empty"
和
"@android:id/list"
另见https://developer.android.com/reference/android/app/ListActivity
ListActivity具有默认布局,该布局由单个,
全屏列表位于屏幕中央。但是,如果您愿意,
您可以通过设置自己的视图布局来自定义屏幕布局
与onCreate()中的setContentView()一起使用。为此,您自己的观点必须
包含ID为“ @android:id / list”(或R.id.list)的ListView对象
如果在代码中)
关于android-studio - 如何摆脱警告“无法解析ExpandableListView的符号'id/android'”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/52618549/