// 将RecyclerView改变成ListView NewsAdapter newsAdapter = new NewsAdapter(mActivity,news); rvNews.setAdapter(newsAdapter); LinearLayoutManager linearManager = new LinearLayoutManager(mActivity,LinearLayoutManager.VERTICAL,false); rvNews.setLayoutManager(linearManager); // 设置item间的间隔线 rvNews.addItemDecoration(new DividerItemDecoration(mActivity,DividerItemDecoration.VERTICAL_LIST)); RecyclerView可以显示出来从网络中读取的封装的数据,但是条目中间没有分割线啊,求大神。
相关分类