title: android dialog can not fund function for setPositiveButton()
body: <p>I have a listener for a specific item in my adapter. When I click it I want to show a dialog. My problem is that I can not get my dialog "builder.setPositiveButton("Cancel", new deleteRow());" to work. I can never get it to find any of my functions. How can I have my dialog run a function?</p>
  
  <p>In my fragment </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) {
  
                  View cancel = view.findViewById(R.id.x);
                  cancel.setOnClickListener(new View.OnClickListener() {
                      @Override
                      public void onClick(View v) {
                          getActivity().showDialog(DIALOG_ALERT);
                      }
                  });
  
                  Intent myIntent = new Intent(getActivity(), UploadVideoActivity.class);
                  startActivity(myIntent);
              }
              @Override
              protected Dialog onCreateDialog(int id) {
                  switch (id) {
                      case DIALOG_ALERT:
                          AlertDialog.Builder builder = new AlertDialog.Builder(getActivity().getApplicationContext());
                          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 onCreateDialog(id);
              }
  
          });
  
  
      }
      public void deleteRow() {
  
      }
  </code></pre>