How did the Lunar Lander example make the image backgrounds transparent?

Posted by user279112 on Stack Overflow See other posts from Stack Overflow or by user279112
Published on 2010-03-09T00:19:26Z Indexed on 2010/03/09 0:21 UTC
Read the original article Hit count: 581

Filed under:
|
|

Hello. I'm trying to make a GUI program with the Android SDK, using their Lunar Lander example as a significant self-teaching tool in the process. I've noticed their sprites' images' backgrounds, which were at least usually pure white, did not show up in their program. I want to ask how they did that, since their site doesn't explain simple things very well.

I've managed to pull that off before on another GUI SDK, wherein all I had to do was to call a function and pass it a few floats to define a certain color, and until my code told it to do otherwise, that function would make sure that that particular color in my sprites' images was totally transparent.

However I've wrestled with the Lunar Lander example and getting my own program to show some custom graphics for a week or two now, and I haven't noticed any such function call in the Lunar Lander example. I tried to look for it, but I did not find anything. I've tried to Google some tutorial or other reference material, but what I've found so far is just straying off into unrelated areas and totally dodging this EXTREMELY important lesson on the SDK's basics.

Any ideas? Thanks!

© Stack Overflow or respective owner

Related posts about android

Related posts about gui