I was in the process of changing an Activity into a Fragment and got the following error as soon as I inflated the RecyclerView.
@Override
public View onCrea
Still null pointer exception even if I initialize it in onCreateView
.
Add it programatically.
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
...
// create recyclerview
...
LinearLayout llContainer = (LinearLayout) v.findViewById(R.id.llContainer);
llContainer.addView(recyclerView);
return v;
}