Code example for GradientDrawable

Methods: draw

0
    @Override 
    protected void dispatchDraw(Canvas canvas) {
        super.dispatchDraw(canvas);
 
        mFadingEdgeLeft.draw(canvas);
        mFadingEdgeRight.draw(canvas);
        if (mShowTopShadow) mShadow.draw(canvas);
        if (mShowBottomBar) mBottomBar.draw(canvas);
        if (mShowTab) mTabDrawable.draw(canvas);
    } 
 
    @Override 
    public boolean onTouchEvent(MotionEvent event) {
        final int action = event.getAction();
        final float x = event.getX();
        final float y = event.getY();
 
        switch (action) {
        case MotionEvent.ACTION_DOWN:
            if (mCurrentDownEvent != null) {
                mCurrentDownEvent.recycle();