java - How to Set the Background Color Behind a .png Background in Android -


so have set of .png pictures have transparent background on checkerboard. when playing piece clicked, possible places piece can move change color. however, want know if in setting background color of tile , if tile has opposing piece on it, picture of opposing piece overridden , erased in favor of color. , if erased, how can avoid problem?

this call used set background .png file

btn.setbackgroundresource(r.drawable.filename); 

this call used set background color

btn.setbackgroundcolor(color.color); 


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -