Code example for Toast

Methods: cancel

0
 
    @Override 
    protected void setupButton(View view) {
        super.setupButton(view);
        if (view == null && mToast != null) {
            mToast.cancel();
            mToast = null;
        } 
    } 
 
    @Override 
    protected void updateState(Context context) {
        int timeout = getScreenTimeout(context);
 
        if (timeout <= SCREEN_TIMEOUT_LOW) {
            mIcon = R.drawable.stat_screen_timeout_off; 
            mState = STATE_DISABLED; 
        } else if (timeout <= SCREEN_TIMEOUT_HIGH) {
            mIcon = R.drawable.stat_screen_timeout_off; 
            mState = STATE_INTERMEDIATE; 
        } else {