Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

events button  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to capture events pushing and leaving a button or image button but I don't know how to do it....please can somebody help me?
And maybe an event when I have my finger over the button...
Thanks!
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check their respective javadocs - android.widget.Button has a whole bunch of listeners you can add to it, many of them inherited from the android.view.View class (like setOnClickListener and setOnHoverListener).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!