android - Renderscript transparency / alpha -


i'm using ics , trying show transparent renderscript layer on regular view. use rs draw text on app.

i'm using setalpha(8, 8); , can see layer generated it's bgra (dumpsys surfaceflinger).

my rs script doing this:

rsgclearcolor(0.0f, 0.0f, 0.0f, 0.0f); rsgdrawtext("hello!", 50,50); 

i able show renderscript layer drawing text, on regular view.

my main activity uses setcontentview 2 times, 1 main view, , second 1 rs. if approach might wrong, should @ least able see background of app, while see black , "hello!" text in white covering everything. tried using 2 different activities, i've never been able make renderscript layer transparent.

any ideas?

you need set pixelformat , zorder of renderscript view. try adding when create renderscript view:

view.getholder().setformat(pixelformat.translucent); view.setzorderontop(true); 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -