How to make bitmap transparent?

前端 未结 6 747
夕颜
夕颜 2021-01-14 11:40
/**
 * @param bitmap
 *            The source bitmap.
 * @param opacity
 *            a value between 0 (completely transparent) and 255 (completely
 *            op         


        
6条回答
  •  别那么骄傲
    2021-01-14 12:31

    Making an existing bitmap transparent is too simple.

    If you want to make your bitmap transparent before further drawing follow this.

    if your bitmap is mBitmap then Just use:-

    mBitmap.eraseColor(Color.TRANSPARENT) 
    

    Thats it. Good luck !!

提交回复
热议问题