I\'m working on ClickableSpan
in a TextView, and I\'m trying to get the clicked span\'s text. This is my code.
// this is the text we\'ll be ope
A little simpler, could also pass a model reference if necessary.
public class SpecialClickableSpan extends ClickableSpan {
String text;
public SpecialClickableSpan(String text){
super();
this.text = text;
}
@Override
public void onClick(View widget) {
Log.d(TAG, "onClick [" + text + "]");
}
}
Then call new SpecialClickableSpan("My Text")