Masking a Drawable/Bitmap on Android

后端 未结 5 1627
挽巷
挽巷 2020-12-28 17:12

I\'m currently looking for a way to use a black and white bitmap to mask the alpha channel of another bitmap or Drawable on Android. I\'m curious as to what the best way to

5条回答
  •  春和景丽
    2020-12-28 17:50

    I'm not entirely clear on what you're going for, but I believe that a combination of BitmapDrawable and LayerDrawable may work. BitmapDrawable will allow you to use your Bitmaps as Drawables, and then you can use LayerDrawable to layer the mask on top of another Drawable.

提交回复
热议问题