I would like to ask the use of image button in Android programming when simple button can also add the image with the button. How can we generate click event of image button?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ImageButton inherits from ImageView and has its own properties compared to Button properties.
you can check properties here,
http://developer.android.com/reference/android/widget/ImageButton.html
Make your activity implement OnClickListener, then
in OnCreate() or after that event.
use ,
in onClick() function you can handle the click event