title: Dialog error when open from a Adapter + ListView
body: <p>I have a little problem with a Dialog.
  It's a ListView of Videos with thumbnails that load the videos with an Adapter. The ListView register an OnItemClickListener and inside the OnClickItem method I try to raise the Dialog.</p>
  
  <p>I've tried with various types of Dialog but nothing happened. A simplified piece of code it's here:</p>
  
  <pre><code>public class ListOfVideos extends Activity {
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.list_of_videos);
            init_phone_video_grid();
      }
  
      private void init_phone_video_grid() {
  
          // Here's some code for the video reading
  
          // The ListView
          videolist = (ListView) findViewById(R.id.PhoneVideoList);
          videolist.setAdapter(new VideoAdapter(getApplicationContext()));
          videolist.setOnItemClickListener(new OnItemClickListener() {
  
              @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position, long id) {
  
                  // Here's some code for the video reading
  
                  /** ============= Here's the problem ================ **/
                  AlertDialog.Builder builder = new AlertDialog.Builder(v.getContext());
                  builder.setMessage("Example Message")
                          .setTitle("This is the title!!")
                          .setCancelable(false)
                          .setNeutralButton("Ok",
                                  new DialogInterface.OnClickListener() {
                                      public void onClick(DialogInterface dialog, int id) {
                                          dialog.cancel();
                                      }
                                  });
                  AlertDialog alert = builder.create();
                  alert.show();
  
                  System.out.println("[debug]" + "Open File " + filename);
              }
          });
      }
  </code></pre>
  
  <p>The list of videos load perfectly. But when I click on an Item:</p>
  
  <ol>
  <li><p>The Dialog does not show</p></li>
  <li><p>I got a error message in the LogCat, that state:  "show() Dialog's window is null!"</p></li>
  <li><p>The println debug message, appears ok in the LogCat</p></li>
  </ol>
  
  <p>I have searched for that message error, but there's not much information.</p>
  
  <p>I think the problem could be on the Context that receive the Builder, but I'm stuck on this point. </p>
  
  <p>Any advice will be apreciated</p>