Android in the implementation of image click Jump, rookie online and other urgent help

Source: Internet
Author: User

============ Problem Description ============



I want to do a click on the image and then jump to the other interface effect,
Which is to implement the picture click event but I don't know how to listen to the Click event
Help

============ Solution 1============


ImageView to a attr:
Android:id= "@+id/image"
Android:clickable= "true"
The activity then implements the View.onclicklistener interface, implements the OnClick () method, and then processes it according to the ID:
It won't be that simple. It's not so simple. , huh?!

============ Solution 2============


Use Findviewbyid to find the view in activity, then View.setonclicklisetener set the Listener

============ Solution 3============


Set the Setonclicklistener for the button you need to click, and then after you set up the listener to process the interaction you want to implement the function, as for the system how to determine the click that is the internal Android based on your location to do the event distribution

Android in the implementation of image click Jump, rookie online and other urgent help

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.