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
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.