Android implementation method of adding click event to textview
•
Android
First, set the clickable property of textview to true.
It can be set in the layout file, such as:
You can also set in Java code:
textView.setClickable(true);
Then bind the event callback function:
Complete the click event binding of textview!
The above is all about the implementation method of Android adding click events to textview brought by Xiaobian. I hope you can support more programming tips~
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码