background.png adding to a snake game

by Sunil Deshpande » Wed, 29 Apr 2009 01:52:17 GMT

Sponsored Links
 Hi All,
 I am trying to learn android application development. For start I am
trying to modify the snake game which is given in SDK samples. Could
you please tell me how to change the background of snake game through
code. I want to insert my image instead of black color background.
Please tell me how to go ahead.

Warm regards,


Other Threads

1. Jobs blogs

Meat 700 blogs about Job Business Politics Fashion and much more Plz
vist our Blogsite


2. How to overlay animation upon a Vie


I am new to Android and current try to realize a UI that a
drawableAnimation can keep floating upon a customized view as a small-
animating widget while I can still focus on and work on the customized

Actually I tried serveral solutions but all failed as follows,

(1) I tried to use the customized view in the main activity and send a
new intent to start another activity to show the small-animating
widget, but the new activity turned to be full-screen and black
background even I set the theme as transprarent(this is also the
confusing isse for me, the new activity is always black background,
event I set transparent attribute in small-animating widget's
overriden OnDraw() method).

(2)I tried to put the small animation widet into a dialog view but
unfortunately it turn to be just another activity and block the main
activity, I have to press the Button BACK to close the small-
animation-showing dialog to use the main activity.

(3)I tried to the SurfaceView. I learned from ApiDemo that implemented
the main activity viewas one of the Surface View and plus the small
animation widget as a normal view in another xml file. But again the
sad thing is I found my customized main activity view had already
inherited from ListView and cannot be multi-inherited.

(4)I also tried to merge the small-animate widget view in to main.xls
and set the zAxis attributes as TOP ,  but it seems not work.(The
animation widget turned out to be in the same layer with other views,
squeezed the layout and broke it)

As a result, I am getting a little bit despair about the solutions.
Any better idea to help me out?
Thanks in Advance.



3. Notepadv1 tutorial

4. Problem with Notepadv1 tutorial

5. Accelerometer Applications

6. "Failed to reopen debug port for Selected Client to: 8700" error

7. About Google Map Installation on Target