80,351
社区成员
发帖
与我相关
我的任务
分享
ListView listView;
SimpleAdapter simpleAdapter;
map=new HashMap<String, Object>();
map.put("textView_id", 1);
map.put("textView_name", "张三");
map.put("button_delete",View.GONE);
list.add(map);
String[] from={"textView_id","textView_name","button_delete"};
int[] to={R.id.textView_id, R.id.textView_name, R.id.button_delete};
simpleAdapter = new SimpleAdapter(this.getContext(),list,R.layout.layoutMain, from,to);
listView.setAdapter(simpleAdapter);