I would like to ask if I can make an icon in the title of a dialog box clickable. I have use the following lines to set the title "New Contact" in the left side of the dialog box and an icon in the right side. So, can this icon(x5) become clickable in some way? I would like it to function like a close button.
dialog.requestWindowFeature(Window.FEATURE_RIGHT_ICON);
dialog.setTitle("New Contact");
dialog.setContentView(R.layout.pop_up_new_contact);//loads the layout we have already create pop_up_new_contact.xml
dialog.setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON, R.drawable.x5);//adds an icon in the left of the Title.
dialog.setCancelable(true);