public void buttonClick(View v) {
        switch (v.getId()) {
            case R.id.show:
                showAppMsg();
                break;
            case R.id.cancel_all:
                AppMsg.cancelAll(this);
                break;
            default:
                return;
        }
    }
public void buttonClick ( View v ) { switch ( v . getId ( ) ) { case R . id . show : showAppMsg ( ) ; break ; case R . id . cancel_all : AppMsg . cancelAll ( this ) ; break ; default : return ; } }
Button onClick listener.

@param v