Code example for DialogFragment

Methods: dismiss

0
        releaseList.setOnItemClickListener(this);
    } 
 
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        callbacks.onReleaseSelected(release.get(position).getReleaseMbid());
        dismiss();
    } 
 
    @Override 
    public void onCancel(DialogInterface dialog) {
        super.onCancel(dialog);
        getActivity().finish();
    } 
 
}