Hi I\'m having an issue with the new Android Lollipop RecyclerView
It keeps crashing with the following exception:
Attempt to inv
Add the following code:
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
recyclerView.setLayoutManager(layoutManager);
Before adding adapter:
recyclerView.setAdapter(adapter);
In the android Api level 22 it will not give the error. Instead it skips the layout if the Adapter is not found.
By showing the warning:
RecyclerView﹕ No adapter attached; skipping layout
But your app will not crash and runs, but recyclerView
doesn't shown.