File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Single onClick method to handle text and button click Android Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Single onClick method to handle text and button click Android" Watch "Single onClick method to handle text and button click Android" New topic
Author

Single onClick method to handle text and button click Android

Archie sudhir
Greenhorn

Joined: Jun 24, 2010
Posts: 2
Hi,

Can any one tell ... Single onClick method to handle text and button click in Android


eg:

TextView txt1;
Button b1:

b1.setOnClickListener(this);
txt1.setOnclickListener(this);

public void onClick(View v1) {

/*What to write to diff between the two onclick events*/
}
asha Pawaskar
Greenhorn

Joined: Jun 25, 2010
Posts: 7
Hey try with this


// do something
break;

}
}


[/code]


Archie sudhir
Greenhorn

Joined: Jun 24, 2010
Posts: 2
hi,

Thank you .....

Its working .....
 
 
subject: Single onClick method to handle text and button click Android