I am new to android development so sorry if this question has a really obvious answer. I am hoping to make a game for the platform but to start with I have just tried to make a basic layout of 4 buttons to move in different directions and then have a background and an image in front which will be my sprite and move across the screen depending on what button is pressed.
At the moment I have created two views. One via the main xml document and the other through the java code itself. The java code one contains the background and image to be drawn and the main.xml contains the buttons.
At the moment I have my code set up like this:
this.setContentView(R.layout.main); <<<<<<<<<< xml
this.setContentView(this.myTestView); <<<<<<<<<<<<<< java
I am aware that I am basically setting one and then setting the other over the top of it and this means that only one of these views will appear. Does anyone know of a way I can use these views in conjunction so that both the images frm the java file and the layout from the xml can both be used?
Cheers for any help.