Code example for Paint

Methods: setAlpha

0
        canvas.drawBitmap(mMapPin, null, getBounds(), mMapPinPaint);
    } 
 
    @Override 
    public void setAlpha(int alpha) {
        mMapPinPaint.setAlpha(alpha);
    } 
 
    @Override 
    public void setColorFilter(ColorFilter cf) {
        mMapPinPaint.setColorFilter(cf);
    } 
 
    @Override 
    public int getOpacity() { 
        return PixelFormat.TRANSLUCENT;
    } 
}