code: public void setFragment(Fragment fragment,String title) {
          setFragment(fragment,title,null);
  
          if(!isCurrentFragmentChild) {// remove the last child from the stack
              childFragmentStack.remove(childFragmentStack.size() - 1);
              childTitleStack.remove(childTitleStack.size() - 1);
          }
          else for(int i = childFragmentStack.size()-1; i >= 0;i--) { // if a section is clicked when user is into a child remove all childs from stack
              childFragmentStack.remove(i);
              childTitleStack.remove(i);
          }
  
          // add to the childStack the Fragment and title
          childFragmentStack.add(fragment);
          childTitleStack.add(title);
  
          isCurrentFragmentChild = false;
      }
docs: Set the fragment to the activity content.<br />
  N.B. If you want to support the master/child flow, please consider to use setFragmentChild instead
  
  @param fragment to replace into the main content
  @param title to set into Toolbar