Code example for BitmapDrawable

Methods: draw

0
        } 
 
        @Override 
        public void onDrawShadow(Canvas canvas) {
 
            mBitmapDrawable.draw(canvas);
        } 
 
        @Override 
        public void onProvideShadowMetrics(Point shadowSize, Point shadowTouchPoint) {
 
            super.onProvideShadowMetrics(shadowSize, shadowTouchPoint);
 
            // Double the height and width 
            int height = getView().getHeight() * 2;
            int width = getView().getWidth() * 2;            
            mBitmapDrawable.setBounds(0, 0, width, height);
            shadowSize.set(width, height);
             
            // Set the touch point to the middle 
            shadowTouchPoint.set(width / 2, height / 2);