I want to display recycler view inside fragment but i am getting java.lang.NullPointerException: Attempt to invoke virtual method \'boolean android.support.v7.widget.Rec
Try using:
final LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
I think your context is not passed in constructing linearlayoutmanager
You are creating a view (in the first line) and you are ignoring it and returning something else.
You should do this :
return(rootview)