Code example for TextSwitcher

Methods: setText

0
        mCounter++;
        updateCounter(); 
    } 
 
    private void updateCounter() { 
        mSwitcher.setText(String.valueOf(mCounter));
    } 
 
    public View makeView() {
        TextView t = new TextView(this);
        t.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
        t.setTextSize(36);
        return t;
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE