Skip to content

Instantly share code, notes, and snippets.

@ataulm
Created March 29, 2018 16:47
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 ataulm/fdb37a00dddf249699ec6027466a0081 to your computer and use it in GitHub Desktop.
Save ataulm/fdb37a00dddf249699ec6027466a0081 to your computer and use it in GitHub Desktop.
/**
* Handles {@link FeedbackFragment} with {@link ClickableSpan} (including {@link URLSpan]}). Adds
* earcon and pitch information to the fragment.
*
* @param fragment The fragment containing {@link ClickableSpan}.
*/
private static void handleClickableSpan(FeedbackFragment fragment) {
final Bundle speechParams = new Bundle(Bundle.EMPTY);
speechParams.putFloat(SpeechParam.PITCH, PITCH_CHANGE_HYPERLINK);
fragment.setSpeechParams(speechParams);
fragment.addEarcon(R.raw.hyperlink);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment