I want to split the screen by 30% and 70% vertically, How can i achieve this with lwuit? I used/tried GridLayout but it splits the screen equally. Need a example code for this.
Thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Both other answers will fail when rotating the screen of a device.
You can take two approaches, use a table layout which supports percentage distribution of layout constraints.
Or create a subclass of
Contaienrthat overrides thecalcPreferredSizemethod and returns a dimension of 30 or 70 percent appropriately. Then just add both of them to aBoxLayoutcontainer and use as desired e.g.: