(android)关于ListFragment使用

我也第一次玩,我直接把Fragment改为ListFragment,一运行就报这个错误。

Your content must have a ListView whose id attribute is 'android.R.id.list'

大概也能知道是什么意思,要在对应的xml文件加上ListView 并且id这个属性叫android.R.id.list

android:id="@android:id/list"

你可能感兴趣的:((android)关于ListFragment使用)