【文件属性】:
文件名称:Simpleadapter的简单用法
文件大小:414KB
文件格式:RAR
更新时间:2018-09-01 11:09:53
adapter
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lv = (ListView) findViewById(R.id.listview);
SimpleAdapter adapter = new SimpleAdapter(this, getData(),
R.layout.list_item,
new String[] { "img", "title", "info" }, new int[] { R.id.img,
R.id.title, R.id.info });
lv.setAdapter(adapter);
}
private List