title: Android Displaying Snackbar Inside Fragment
body: <p>I am running into some issues with displaying a snackbar inside a fragment. I can set one up fine for an activity but when I try in a fragment it just doesnt appear and no error is given.</p>
  
  <p><strong>Snackbar inside fragment</strong></p>
  
  <pre><code>Snackbar snackbar = Snackbar.make(rootView, "Snackbar test", Snackbar.LENGTH_SHORT);
  View sbView = snackbar.getView();
  TextView textView = (TextView) sbView.findViewById(android.support.design.R.id.snackbar_text);
  textView.setTextColor(Color.YELLOW);
  snackbar.show();   
  </code></pre>
  
  <p><strong>rootView in fragment</strong></p>
  
  <pre><code>    rootView = inflater.inflate(R.layout.fragment_possible_recipes, container, false);
  </code></pre>
  
  <p><strong>Fragments XML</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:id="@+id/coordinatorLayout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;ListView
      android:id="@android:id/list"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;&lt;/ListView&gt;
  
  &lt;ImageView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:paddingTop="10dp"
      android:paddingBottom="50dp"
      android:src="@drawable/no_result"
      android:visibility="gone"
      android:id="@+id/imageview"
      android:layout_gravity="center"/&gt;
  
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/filterButton"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentEnd="true"
      android:layout_gravity="bottom|right"
      android:layout_marginBottom="63dp"
      android:layout_marginRight="16dp"
      android:clickable="true"
      android:src="@drawable/ic_filter"
      app:backgroundTint="@color/floatingButton" /&gt;
  
  
   &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p><strong>Main Activity XML</strong></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"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/drawer_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  &lt;!-- The main content view --&gt;
  
  &lt;android.support.design.widget.CoordinatorLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/drawer_layout2"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              android:background="?attr/colorPrimary"
              app:layout_scrollFlags="scroll|enterAlways"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /&gt;
  
          &lt;android.support.design.widget.TabLayout
              android:id="@+id/tabs"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              app:tabMode="fixed"
              app:tabGravity="fill"/&gt;
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.view.ViewPager
          android:id="@+id/viewpager"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  
      &lt;FrameLayout
          android:id="@+id/container_body"
          android:layout_width="fill_parent"
          android:layout_height="0dp"
          android:layout_weight="1" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  
  
  &lt;fragment
      android:id="@+id/fragment_navigation_drawer"
      android:name="com.example.rory.pocketchef.Fragments.FragmentDrawer"
      android:layout_width="@dimen/nav_drawer_width"
      android:layout_height="match_parent"
      android:layout_gravity="start"
      app:layout="@layout/fragment_navigation_drawer"
      tools:layout="@layout/fragment_navigation_drawer" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>