Yannick M
- Forum posts: 46
Feb 3, 2014, 6:03:57 AM via Website
Feb 3, 2014 6:03:57 AM via Website
Because I'm working with bitmaps and canvas I set up the ContentView like that:
Now I want to have two buttons over this layout. I read you have to set up a FrameLayout, where you can overlay two different layouts. I googled FrameLayouts but I could just find how you set it up in a XML file.
But how do you do it in the java file or combined with a xml file?
Thank you very much
1public void onCreate(Bundle savedInstanceState) {
2 super.onCreate(savedInstanceState);
3 v = new OurView(this);
4 v.setOnTouchListener(this);
5 setContentView(v);
2 super.onCreate(savedInstanceState);
3 v = new OurView(this);
4 v.setOnTouchListener(this);
5 setContentView(v);
Now I want to have two buttons over this layout. I read you have to set up a FrameLayout, where you can overlay two different layouts. I googled FrameLayouts but I could just find how you set it up in a XML file.
But how do you do it in the java file or combined with a xml file?
Thank you very much