Code example for TextSwitcher

Methods: setText

0
 
 
    String s;
    s = DateFormat.format(is24 ? "k:" : "h:",mCal).toString();
    if (!s.equals(mHour)) {
        mSwitchHour.setText(mHour = s);
    } 
    s = DateFormat.format(mOrient == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE ? "mm:" : "mm", mCal).toString();
    if (!s.equals(mMin)) {
        mSwitchMin.setText(mMin = s);
    } 
    s = DateFormat.format("ss",mCal).toString();
    if (!s.equals(mSec)) {
        mSwitchSec.setText(mSec = s);
    } 
  } 
 
  public View makeView() {
    return mInflater.inflate(R.layout.bedclock_text, null);
  } 
Stop searching for code, let great code find you!  Add Codota to your java IDE