The drawableright property of EditText in Android sets the click event
•
Android
This method is universal, not only for EditText, but also for textview, AutoCompleteTextView and other controls. The official Google API does not provide a direct method to set the click event of the picture on the right, so we need to judge the click event by the click position, as shown in the figure below:
Layout file:
MainActivity. java
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support 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
二维码