RecyclerView data can not be displayed

I walked down RecyclerView can be regarded as the first pit

But his hard all night one night, only to find the next afternoon the bug, the true impact of the progress of the

I too hard ah!

   RecyclerView rv_poetry_recycler;
   RecyclerView.LayoutManager layoutManager;
 layoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
	List<String> list = new ArrayList<String>();
	 for (int i = 0 ; i < 100;i++){
	     list.add("hello"+i);
	 }
	
	//这就是我的痛苦之处
	 rv_poetry_recycler.setLayoutManager(layoutManager);
	 rv_poetry_recycler.setAdapter(new Adapter(this,list));

I even forgot to add RecyclerView LayoutManager

Published 89 original articles · won praise 13 · views 7731

Guess you like

Origin blog.csdn.net/printf123scanf/article/details/103182200