Code example for TextSwitcher

Methods: setText

0
 
    onSwitchText(null); 
  } 
 
  public void onSwitchText(View v) {
    mTextSwitcher.setText(TEXTS[mTextsPosition]);
    setNextPosition(); 
  } 
 
  private void setNextPosition() { 
    mTextsPosition = (mTextsPosition + 1) % TEXTS.length;
  } 
}