Code example for AnimationDrawable

0
		} 
	} 
	 
	public void setGifDecoder(GifDecoder gifDecoder){
		this.gifDecoder = gifDecoder;
		animationDrawable = new AnimationDrawable();
	} 
	 
	@Override 
	public void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
		super.onMeasure(widthMeasureSpec, heightMeasureSpec);
		 
		width = getMeasuredWidth();
		height = getMeasuredHeight();
	} 
	 
	@Override 
	public boolean onTouchEvent(MotionEvent event){
		if((mode & GESTURE_ENABLE) == GESTURE_ENABLE){
			switch (event.getAction() & MotionEvent.ACTION_MASK) {
			case MotionEvent.ACTION_DOWN: