2019年9月8日

ListView的事件

摘要: 一、点击事件setOnItemClickListener Activity需要实现AdapterView.OnItemClickListener接口 并在OnCreate方法中调用lv.setOnItemClickListener(this) 二、长按事件setOnItemLongClickList 阅读全文

posted @ 2019-09-08 10:08 红兔兔 阅读(209) 评论(0) 推荐(0)

自定义ListView的Adapter

摘要: 一、自定义MyAdapter 二、在MainActivity中使用 阅读全文

posted @ 2019-09-08 09:37 红兔兔 阅读(153) 评论(0) 推荐(0)

ListView的SimpleAdapter

摘要: SimpleAdapter adapter = new SimpleAdapter{ this,//父容器 list,//数据源 R.layout.item,//行布局 new String[]{"logo", "title", "version", "size"},//数据源List<Map>中, 阅读全文

posted @ 2019-09-08 08:23 红兔兔 阅读(160) 评论(0) 推荐(0)

导航