Android listview添加子项

时间:2014-03-09 23:21:36

标签: android listview submenu

我想在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]);
    }

1 个答案:

答案 0 :(得分:0)