This week's book giveaway is in the Security forum.
We're giving away four copies of Securing DevOps and have Julien Vehent on-line!
See this thread for details.
Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Single onClick method to handle text and button click Android  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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*/
}
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey try with this


// do something
break;

}
}


[/code]


 
Archie sudhir
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Thank you .....

Its working .....
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!