title: Toast in a fragment does not show
body: <p>I would like to have a popup contextual help when the user clicks a button in a FRAGMENT of an activity. I have tried using the <code>Toast</code> to perform this action but in vain. The popup dialog box does not show (please also note that the recommendations in <a href="https://stackoverflow.com/questions/10770055/use-toast-inside-fragment">Use Toast inside Fragment</a> did not help).</p>
  
  <p>My code in the fragment class is written below:</p>
  
  <pre><code>            final Button help = (Button) view.findViewById(R.id.help_button);
          del.setOnClickListener(new View.OnClickListener(){
          public void onClick(View v) {
              Context context = (TabsActivity) getActivity().getApplicationContext();
              CharSequence text = "Hello toast!";
              int duration = Toast.LENGTH_LONG;
              Toast toast = Toast.makeText(view.getContext(), text, duration);
              toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
              toast.show();
              }
          });
  </code></pre>
  
  <p>I have tried several variations of <code>CONTEXT</code>, two of which are shown in the code.
  I have also tried <code>getActivity()</code>, <code>getView().getContext()</code>, <code>getContext()</code> all of which went in vain. Can you please help understanding how to set the CONTEXT in a fragment?</p>