Code example for AlphaAnimation

Methods: hasEnded, reset

0
 
                // Reset ve trang thai het touch. 
                this.flagTouchDown = false;
 
                // Chi invisible effect khi anim da ket thuc. 
                if (this.alphaAnim.hasEnded()) {
                    this.ivEffect.setVisibility(View.INVISIBLE);
                    this.alphaAnim.reset();
                } 
 
                // Raise event khi con nam trong button. 
                // TODO: Co nen toi uu de khong phai lay rect moi lan touch up hay khong? 
                Rect r = new Rect();
                v.getHitRect(r);
                if (r.contains((int)event.getX(), (int)event.getY())) {
                    // Fire event. 
                    if (this.listener != null) {
                        this.listener.onClick(this, new AdlmButtonArguments());
                    } 
                }