Skip to content

Instantly share code, notes, and snippets.

@NightWhistler
Created May 1, 2013 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NightWhistler/5494764 to your computer and use it in GitHub Desktop.
Save NightWhistler/5494764 to your computer and use it in GitHub Desktop.
public class MyExpansionListener implements ExpansionListener {
private TextView textView;
public MyExpansionListener( TextView textView ) {
this.textView = textView;
}
public void expandText( String fullText, int start, int end ) {
String before = textView.getText().substring(0, start);
String after = textView.getText().substring(end);
textView.setText( before + fullText + after);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment