title: Create BaseFragment and extend this Fragment in ChildFragment
body: <p>I don't know whether this is repeated question or not, But I didn't found any solution.</p>
  
  <p>The problem is, there is a screen which has similar views in all the screens, that screens are in fragment.</p>
  
  <p>So, I want to create a base fragment and want to extend this base fragment in all child fragments.</p>
  
  <p>I found on google, for demo examples, But I didn't find any solution.</p>
  
  <p>I don't know from where to start.</p>
  
  <p>Please help me.</p>
  
  <p>I found this links but it is not much clear:</p>
  
  <ol>
  <li><p><a href="https://stackoverflow.com/questions/26049114/fragments-inheritance-android">Fragments inheritance Android</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/32552592/when-do-i-need-a-base-activity-and-base-fragment">When do I need a base activity and base fragment?</a></p></li>
  </ol>
  
  <p>BaseFragment.java</p>
  
  <pre><code>public class BaseFragment extends Fragment {
  
    public BaseFragment() {
      // Required empty public constructor
    }
  
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
  
      return inflater.inflate(R.layout.fragment_base, container, false);
    }
  }
  </code></pre>
  
  <p>ChildFragment.Java</p>
  
  <pre><code>public class ChildFragment extends BaseFragment{
  
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      return inflater.inflate(R.layout.fragment_child, container, false);
    }
  }
  </code></pre>
  
  <p>Now, there is a TextView in fragment_child layout. that is displayed when I run the app,
  but there are two other views in fragment_base, that is not showing...</p>
  
  <p><a href="https://i.stack.imgur.com/J8dzA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/J8dzA.png" alt="enter image description here"></a></p>