摘要: 1. //context:上下文, resource:要转换成view对象的layout的id, root:将layout用root(ViewGroup)包一层作为codify的返回值,一般传null //view = View.inflate(context, R.layout.item_news 阅读全文
posted @ 2016-08-13 15:44 iFat 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 1.布局写listview 2.找到listview 3.封装新闻数据到list集合中 ,目的是为adapter提供数据展示。 4.封装一个Adapter类继承BaseAdatper,写一个构造方法接受list集合数据,复写四个方法 getcount: 有多少条新闻数据,就有多少个条目。 getVi 阅读全文
posted @ 2016-08-13 11:51 iFat 阅读(301) 评论(0) 推荐(0) 编辑