我有一个带有自定义适配器的Listview.我得到了标准
Your content must have a ListView whose id attribute is 'android.R.id.list'
错误,但是,我的ListView有一个android:id =“@ android:id / list”值设置.这真的在做我的头.有什么建议吗?
main.xml中
styles.xml
@drawable/background
fitXY
fill_parent
fill_parent
vertical
fill_parent
wrap_content
#00000000
我的onCreate方法:
/** Called when the activity is first created. */
@Override
public void onCreate( Bundle savedInstanceState ) {
super.onCreate( savedInstanceState );
setContentView( R.layout.main );
m_menu = new ArrayList();
populateMenu();
this.m_adapter = new ListMenuAdapter( this, R.layout.list_item, m_menu );
setListAdapter(this.m_adapter);
}
有任何想法吗?