title: showDialog() is not working within an adapter
body: <p>I am trying to bring up a dialog when an ImageView in my adapter is clicked. I have tried several things but have not gotten it to work. Right now, I am trying to use showDialog() like I would in an Activity but have had no luck. It can not find the showDialog() method.</p>
  
  <p>Adapter:</p>
  
  <pre><code>@Override
      public View getView(final int position, View convertView, ViewGroup parent) {
          String[] mStringArray = new String[mData.size()];
          mStringArray = mData.toArray(mStringArray);
          final Integer recordID = Integer.parseInt(mStringArray[position]);
          Cursor res = mydb.getData(recordID);
          ImageView cancel = (ImageView) convertView.findViewById(R.id.x);
          res.close(); // that's important too, otherwise you're gonna leak cursors
  
          cancel.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  activityContext.showDialog(DIALOG_ALERT);
                  mydb.deleteSavedVideo(recordID);
                  mData.remove(position);
                  notifyDataSetChanged();
              }
          });
  
          return convertView;
      }
  </code></pre>
  
  <p>Adapter: </p>
  
  <pre><code>@Override
      protected Dialog onCreateDialog(int id) {
          switch (id) {
              case DIALOG_ALERT:
                  AlertDialog.Builder builder = new AlertDialog.Builder(activityContext);
                  builder.setTitle("Remove Video");
                  builder.setMessage("hkjh.");
                  builder.setCancelable(true);
                  builder.setPositiveButton("Cancel", new CancelOnClickListener());
                  builder.setNegativeButton("Remove", new deleteRow());
                  AlertDialog dialog = builder.create();
                  dialog.show();
          }
          return super.onCreateDialog(id);
      }
  </code></pre>
  
  <p><em>Updated</em></p>
  
  <p>Adapter constructor</p>
  
  <pre><code>public SavedVideoAdapter(Context context, ArrayList&lt;Object&gt; data, MySQLiteHelper database) {
      mInflater = (LayoutInflater) context
              .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  mData = data;
  mydb = database;
  activityContext = context;
  </code></pre>
  
  <p>}</p>
  
  <p>Activity:</p>
  
  <pre><code>public void getSavedVideos() {
          mydb = new MySQLiteHelper(getActivity());
          listView.setEmptyView(rootview.findViewById(R.id.noSavedVideosTextView));
  
          //Get IDs of all rows in the db
          ArrayList savedVideoIDs = mydb.getAllSavedVideo();
  
          mSavedVideoAdapter = new SavedVideoAdapter(getActivity(), savedVideoIDs, mydb);
          listView.setAdapter(mSavedVideoAdapter);
  
          listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
  
                  Intent myIntent = new Intent(getActivity(), UploadVideoActivity.class);
                  startActivity(myIntent);
              }
          });
      }
  </code></pre>