title: How to display a Toast using a Fragment within a Navigation Drawer
body: <p>I'm trying to have a toast be displayed after I select a menu item from a navigation drawer and the app switches to that <code>fragment</code>. I have this line of code inside the <code>onCreate()</code> method for my <code>fragment</code> so that it will be displayed when the fragment is inflated, except it's not working:</p>
  <pre><code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      myView = inflater.inflate(R.layout.post_layout, container, false);
      //My toast wont work!!:(
      Toast.makeText(Post_Fragment.this, &quot;It worked!&quot;, Toast.LENGTH_SHORT).show();
      return myView;
  }
  </code></pre>
  <p>Any thoughts? Thanks for the help.</p>