I am designing an android application contain MySurfaceView includes a Canvas to draw images in a thread running through the application,
(layout is default main.xml which create with project)
but i have to add a bar/textView in the top and add an AD in the botton of the screen.
then how can i do this ?
my declaration is like this :
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mySurfaceView = new MySurfaceView(this);
setContentView(mySurfaceView);
}
May be my given information is not enough to understand the situation, so if you find any obscurity in my question please ask me
Thanks in advance
Hmm, one possibility is that you could just put it inside of a RelativeLayout or something similar? This assumes that you don’t want to just define it in the xml which would probably look cleaner. The code would probably look something like this (you can definitely make it more efficient/just use a LinearLayout, I just threw down the first thing that came into my head):