title: Subclassed fragment onCreateView
body: <p>for the sake of not duplicating the code I've decided in my program to create a <code>BaseFragment</code> (which extends <code>Fragment</code>) to hold for some boilerplate data and provide proper handling of pause/resume, as well as the <code>newInstance(String myPram)</code> method. Long story short: The role of the BaseFragment is to ensure the saving and restoring of the state, i.e. restoring myPramas a local variable...</p>
  
  <p>What I wanted to do next was to extend that <code>BaseFragment</code> in order to handle two different types of layout for two different Fragments (each of the needs the handling of the MyParam filed): <code>EditFragment</code> and <code>DetailFragment</code>.
  The problem arises now, because no View is inflated for the Fragment, though they are added as a transaction (so they are transparent!).
  <code>EditFragment</code> and <code>DetailFragment</code> both provide the <code>onCreateView()</code> method, in order to build their own views, I am they are correct since I managed to create them without the "subclassing mechanism", and of course BaseFragment does not provide an implementation of the <code>onCreateView()</code> but no result, they draw no UI.</p>
  
  <p>I tried putting some super.onCreateView() here and there, with no result as well...What am I doing wrong?
  Here's the base Fragment:</p>
  
  <pre><code>public class TimetableBaseFragment extends Fragment {
  
  public static String ID_FIELD = "id";
  public static String ID_DESC = "desc";
  private String id;
  private String desc;
  
  // Constructor to deliver previous position along with itself
  public static Fragment newInstance(String id, String desc) {
      TimetableBaseFragment f = new TimetableBaseFragment();
      Bundle args = new Bundle();
      args.putString(ID_FIELD, id);
      args.putString(ID_DESC, desc);
      f.setArguments(args);
      return f;
  }
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      Bundle args = getArguments();
      if (args != null) {
          id = args.getString(ID_FIELD);
          desc = args.getString(ID_DESC);
      }
  
      if (savedInstanceState != null) {
          id = savedInstanceState.getString(ID_FIELD);
          desc = savedInstanceState.getString(ID_DESC);
      }
  }
  
  @Override
  public void onSaveInstanceState(Bundle outState) {
      super.onSaveInstanceState(outState);
      outState.putString(ID_FIELD, id);
      outState.putString(ID_DESC, desc);
  }
  
  @Override
  public void onActivityCreated(@Nullable Bundle savedInstanceState) {
      super.onActivityCreated(savedInstanceState);
  
      if (savedInstanceState != null) {
          id = savedInstanceState.getString(ID_FIELD);
          desc = savedInstanceState.getString(ID_DESC);
      }
  }
  
  public String getExamId() {
      return id;
  }
  
  public String getExamDesc() {
      return desc;
  }
  }
  </code></pre>
  
  <p>And the one I am trying to add is:</p>
  
  <pre><code>public class TimetableEditFragment extends TimetableBaseFragment {
  
  private LinearLayout mLlEditEmpty;
  
  private ArrayList&lt;ScheduleUser&gt; lessons;
  private TimetableEditRecyclerViewAdapter mAdapter;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      lessons = new ArrayList&lt;&gt;();
      mAdapter = new TimetableEditRecyclerViewAdapter(getActivity());
  }
  
  @Nullable
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_timetable_edit, container, false);
  
      mLlEditEmpty = (LinearLayout) rootView.findViewById(R.id.LOGIC_empty);
      RecyclerView mRvEdit = (RecyclerView) rootView.findViewById(R.id.HEADER_rv);
      mRvEdit.setHasFixedSize(true);
      mRvEdit.setLayoutManager(new LinearLayoutManager(getActivity()));
      mRvEdit.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
      mRvEdit.setAdapter(mAdapter);
  
      Toolbar examDesc = (Toolbar) rootView.findViewById(R.id.HEADER_examDesc);
      examDesc.setTitle("TOOLBAR Testing");
  
  
      FloatingActionButton add_fab = (FloatingActionButton) rootView.findViewById(R.id.EDIT_fab);
      add_fab.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              addLesson(new ScheduleUser());
          }
      });
  
      return rootView;
  }
  
  public void addLesson(ScheduleUser newItem) {
      lessons.add(newItem);
      mAdapter.notifyItemInserted(lessons.size() - 1);
  }
  
  public class TimetableEditRecyclerViewAdapter extends RecyclerView.Adapter&lt;TimetableEditRecyclerViewAdapter.ViewHolder&gt; {
      /* Lots of stuff */
  }
  }
  </code></pre>
  
  <p>PS: I've noticed that it's very likely that the child onCreateView() <strong>does not get called at all</strong>, since I had an error, which was due to be fund at runtime, but the system did not notify.</p>
  
  <p>Please help!</p>