标签:
出现No layout manager attached; skipping layout错误
是没有设置LayoutManager
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));//这里用线性显示 类似于listview // mRecyclerView.setLayoutManager(new GridLayoutManager(this, 2));//这里用线性宫格显示 类似于grid view // mRecyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, OrientationHelper.VERTICAL));//这里用线性宫格显示 类似于瀑布流
RecyclerView No layout manager attached; skipping
标签:
原文地址:http://my.oschina.net/yaly/blog/498797