codenameone - How do I fix my problem with my form Preferred Size? - Stack Overflow

I am having problems with scalability in my app. I designed my reports on the 10.9 iPad Simulator skin,

I am having problems with scalability in my app. I designed my reports on the 10.9 iPad Simulator skin, and to test I went down to the Mini skin to check sizes, which displayed correctly. I then went up to the 13.9 skin, and the form displayed correctly. When I went back to the 10.9 skin to check sizes, the components did not scale back down, only half of the textfields and labels are visible on the screen. I have set the form scrollable to false. I think I am missing a key to scaling up and back down. Anyone have this happen and figure it out? Edit 1: I added Screenshots showing my Game screen as I designed it, using 3 vertical constraints, as it displays on the iPad 13.9 skin. Next is the Screenshot of the code after I change the skin back to the iPad 10.9 skin. Finally, the AppleIPadMini skin.

I am having problems with scalability in my app. I designed my reports on the 10.9 iPad Simulator skin, and to test I went down to the Mini skin to check sizes, which displayed correctly. I then went up to the 13.9 skin, and the form displayed correctly. When I went back to the 10.9 skin to check sizes, the components did not scale back down, only half of the textfields and labels are visible on the screen. I have set the form scrollable to false. I think I am missing a key to scaling up and back down. Anyone have this happen and figure it out? Edit 1: I added Screenshots showing my Game screen as I designed it, using 3 vertical constraints, as it displays on the iPad 13.9 skin. Next is the Screenshot of the code after I change the skin back to the iPad 10.9 skin. Finally, the AppleIPadMini skin.

Share Improve this question edited Feb 6 at 2:26 curtjacobs1 asked Feb 3 at 4:15 curtjacobs1curtjacobs1 3972 silver badges8 bronze badges 5
  • You shouldn't touch preferred size. Assuming you used layouts correctly everything should work fine. I need to see the UI code and ideally screenshots to help you resolve such issues. – Shai Almog Commented Feb 4 at 2:18
  • I haven't changed anything with preferred size, but all my tests on all of the 10.9 skins do not conform to the scaling demonstrated on the 2 small and large iPad skins. – curtjacobs1 Commented Feb 6 at 2:32
  • What layout did you use? Can you include some of the code in the question? – Shai Almog Commented Feb 7 at 15:28
  • Here is the code: gist.github/curtjacobs1/584ebcc710e9fbdaaf9ed0995ecef0f0 – curtjacobs1 Commented Feb 10 at 3:22
  • I think it is better to post your code in the question itself - preferably a minimal reproducible example, but if you are going to post a link to it, then I think that link should be in the question itself and not in a comment. – Abra Commented Feb 10 at 5:22
Add a comment  | 

1 Answer 1

Reset to default 1

Your code adds a lot of content to the screen which means there just isn't enough room for everything. You nest layouts, BoxLayout which is very rigid and FlowLayout which is very flaky.

I would suggest using TableLayout for such a large tabular UI. It would also align the elements properly regardless of content and would let you specify size in percentages.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745249504a4618592.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信