Update Solved
I was implenting the wrong view when trying to inflate the fragment, This lead to the incorrect and pointer error. rootview was changed to the below with the correct layout
rootview = inflater.inflate(R.layout.main_layout, container, false);
Well, any statements you place after the return statement turns into an unreachable one. The return statement should be the last statement in onCreateView, after you have initialized your views.