I’m pretty new to the Android scene and I’m having troubles creating an UI for my program.
Since I can’t post a picture of my target I’m going to describe what I actually planned:
- My Ui should be divided into 3 parts. Whereas the upper part takes like 25% of the sreen. – The middle part takes 60% and the bottom part takes 15%.
- The middle part is divided into 2 columns. The first column takes 70% and the second one 30%.
- On the top part i just want to add some buttons.
- In the middle on the left column (which takes 70%) I wanted to add a SurfaceView.
- On the right part I thought of some panel with buttons to navigate through my app.
- The bottom part should be empty.
So I was wondering first of all, how to get the scaling done?
I thought of LinearLayout weights but I couldn’t come up with the proper numbers.
With a RelativeLayout I wasn’t sure how the fill the SurfaceView in properly.
Try using nested LinearLayouts
For the weight part, I once used that attribute as follows
You need to look at android:orientation attribute too.
You also may want to use RelativeLayout