我想在listview中添加subitem。这是我的代码
ArrayList<String> mAllData;
private String [] cognomi = {
//my string
};
public void setData() {
mAllData = new ArrayList<String>();
mAdapter = new MySimpleSearchAdapter(this);
for (int i = 0; i < cognomi.length; i++) {
mAdapter.addItem(cognomi[i]);
mAllData.add(cognomi[i]);
}
答案 0 :(得分:0)
您可以使用预定义的Android布局:http://www.javajirawat.com/2013/03/android-listview-tutorial_12.html