title: navigation drawer not showing properly
body: <p>I am developing news app and I have implemented navigation drawer
   using following <a href="https://guides.codepath.com/android/fragment-navigation-drawer" rel="nofollow noreferrer">link</a> but when I run the code app showing empty white
   screen.</p>
  
  <p>below my MainActivity.java class</p>
  
  <pre><code> public class MainActivity extends AppCompatActivity {
           private DrawerLayout mDrawer;
           private Toolbar toolbar;
  
  
           private ActionBarDrawerToggle drawerToggle;
  
           @Override
           protected void onCreate(Bundle savedInstanceState) {
               super.onCreate(savedInstanceState);
               setContentView(R.layout.activity_main);
  
               // Set a Toolbar to replace the ActionBar.
               toolbar = (Toolbar) findViewById(R.id.toolbar);
               setSupportActionBar(toolbar);
  
               // Find our drawer view
               mDrawer = (DrawerLayout) findViewById(R.id.drawer_layout);
                NavigationView nvDrawer = (NavigationView) findViewById(R.id.nvView);
  
       // Inflate the header view at runtime
               View headerLayout = nvDrawer.inflateHeaderView(R.layout.nav_header);
       // We can now look up items within the header if needed
               @SuppressLint("ResourceType") ImageView ivHeaderPhoto = headerLayout.findViewById(R.drawable.ic_sportnews);
               setupDrawerContent(nvDrawer);
  
           }
  
           @Override
           public boolean onOptionsItemSelected(MenuItem item) {
               // The action bar home/up action should open or close the drawer.
               switch (item.getItemId()) {
                   case android.R.id.home:
                       mDrawer.openDrawer(GravityCompat.START);
                       return true;
               }
  
               return super.onOptionsItemSelected(item);
           }
  
           private void setupDrawerContent(NavigationView navigationView) {
               navigationView.setNavigationItemSelectedListener(
                       menuItem -&gt; {
                           selectDrawerItem(menuItem);
                          return true;
                       });
           }
  
           public void selectDrawerItem(MenuItem menuItem) {
               // Create a new fragment and specify the fragment to show based on nav item clicked
               Fragment fragment = null;
               Class fragmentClass = null;
               switch (menuItem.getItemId()) {
                   case R.id.bbcsports_fragment:
                       fragmentClass = BBCSportFragment.class;
                       break;
                   case R.id.talksports_fragment:
                       fragmentClass = TalkSportsFragment.class;
                       break;                 case R.id.foxsports_fragment:
                       fragmentClass = FoxSportsFragment.class;
                       break;
                   default:
  
              }
  
               try {
                   fragment = (Fragment) fragmentClass.newInstance();
               } catch (Exception e) {
                   e.printStackTrace();
               }
  
               // Insert the fragment by replacing any existing fragment
               FragmentManager fragmentManager = getSupportFragmentManager();
               fragmentManager.beginTransaction().replace(R.id.flContent, fragment).commit();
  
               // Highlight the selected item has been done by NavigationView
               menuItem.setChecked(true);
               // Set action bar title
               setTitle(menuItem.getTitle());
               // Close the navigation drawer
               mDrawer.closeDrawers();
           }
  
  
       }
  </code></pre>
  
  <p>below my activity_main.xml</p>
  
  <pre><code> &lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:id="@+id/drawer_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;!-- This LinearLayout represents the contents of the screen  --&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;!-- The ActionBar displayed at the top --&gt;
          &lt;include
              layout="@layout/toolbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" /&gt;
  
          &lt;!-- The main content view where fragments are loaded --&gt;
          &lt;FrameLayout
              android:id="@+id/flContent"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
      &lt;/LinearLayout&gt;
  
  
   &lt;!-- The navigation drawer that comes from the left --&gt;
      &lt;!-- Note that `android:layout_gravity` needs to be set to 'start' --&gt;
      &lt;android.support.design.widget.NavigationView
          android:id="@+id/nvView"
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          android:background="@android:color/white"
          app:headerLayout="@layout/nav_header"
          app:menu="@menu/navigation_menu" /&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <blockquote>
    <p>below my Fragment class</p>
  </blockquote>
  
  <pre><code>public class BBCSportFragment extends Fragment {
  
      public List&lt;Article&gt; articleList = new ArrayList&lt;Article&gt;();
      @BindView(R.id.recycler_view)
      RecyclerView recyclerView;
      private SportNews sportNews;
      private ArticleAdapter articleAdapter;
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          View view = inflater.inflate(R.layout.fragment_bbcsport, container, false);
          ButterKnife.bind(this, view);
          SportInterface sportInterface = SportClient.getApiService();
          Call&lt;SportNews&gt; call = sportInterface.getArticles();
          call.enqueue(new Callback&lt;SportNews&gt;() {
              @Override
              public void onResponse(Call&lt;SportNews&gt; call, Response&lt;SportNews&gt; response) {
                  sportNews = response.body();
                  if (sportNews != null &amp;&amp; sportNews.getArticles() != null) {
                      articleList.addAll(sportNews.getArticles());
                  }
                  articleAdapter = new ArticleAdapter(articleList, sportNews);
                  RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext());
                  recyclerView.setLayoutManager(layoutManager);
                  recyclerView.setAdapter(articleAdapter);
              }
  
              @Override
              public void onFailure(Call&lt;SportNews&gt; call, Throwable t) {
  
              }
          });
  
  
          return view;
  
  
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/XVtTh.png" alt="screenshot of empty screen"></p>