In my extension i have created a label, which is stored in a variable and i want to detect the label click so how to achieve it?
You can set a click listener for your label, ex:
View view = = label.getView(); //you should first get the view of the lebel.The label variable, is the variable you stored your Label in.
view.setOnClickListener(new View.OnClickListener() { // you can now set the listener for the view to a new click listener.
public void onClick(View v) { // when your label is clicked this method is fired.
// do what you want on the label click.
}
});
Docs: https://developer.android.com/reference/android/view/View.OnClickListener
6 Likes
will this come under the same void?
Your question isn't clear.
1 Like