aspose 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
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 .....
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Single onClick method to handle text and button click Android