本文介绍了安卓:使图像不透明/透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问候,
我想放置图像在一个surfaceview。不过,我想图像是透明的,所以你可以看到图像,也是undlying surfaceview。任何人都可以建议我怎么能做到这一点?
I would like to place an image over a surfaceview. However I would like the image to be transparent so you can see the image and also the undlying surfaceview. Can anyone suggest how I could do this?
推荐答案
这是我画的形状之前,我是怎么做的。
This is how I do it before drawing my shapes.
Bitmap buffer = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_4444);
buffer.eraseColor(Color.TRANSPARENT);
这篇关于安卓:使图像不透明/透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!