I have 4 images. We should be able to click on these images. I\'d like to know if I have to create 4 OnClickListener, or there is another way to do this properly?>
OnClickListener
You can reuse your listener:
DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { /*...*/ } }); phone.setOnClickListener(listener); bookings.setOnClickListener(listener); /*...*/