我想将X数量的静态行添加到使用ListAdapter/BaseAdapter动态填充ListView的ListView。有什么建议么?将静态数据添加到动态创建的使用ListAdapter的ListView
在此先感谢,科尔。
我的解决方案:per @ femi的建议,我结束了使用MergeAdapter。这里是我所做的一个片段:
// create a new MergeAdapter
MergeAdapter aMergeAdapter = new MergeAdapter();
// add the dynamic content
SkipToListActivityValueAdapter skipToListActivityValueAdapter =
new SkipToListActivityValueAdapter(this, sections);
aMergeAdapter.addAdapter(skipToListActivityValueAdapter);
// add the static content
ArrayAdapter<String> aArrayAdapter =
new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, ADDITIONAL_SKIP_TO_OPTIONS);
aMergeAdapter.addAdapter(aArrayAdapter);
// add the aMergeAdapter to the ListAdapter
setListAdapter(aMergeAdapter);
Atleast显示你的code.Show你做了什么.. – 2011-05-26 04:16:14