Ejemplo n.º 1
0
  /**
   * Formats an instruction string, updates it on the screen, and passes it to the parent activity
   * to be spoken.
   *
   * @param resId The resource value of the instruction string.
   * @param repeat Whether the instruction should be repeated indefinitely.
   * @param formatArgs Optional formatting arguments.
   * @see String#format(String, Object...)
   */
  protected void addInstruction(int resId, boolean repeat, Object... formatArgs) {
    final String text = mParentTutorial.getString(resId, formatArgs);

    mInstructions.setVisibility(View.VISIBLE);
    mInstructions.setText(text);

    mParentTutorial.speakInstruction(resId, repeat, formatArgs);
  }