J junaidahmed Well-Known Member Licensed User Longtime User Dec 7, 2011 #1 We are developing an application that contain 80 layout for 600 X 1024 dimension.I would like to run the same application in 480 X 800 without changing in designer and code.How to fit (Autosize all view) for all device. see the attached example layout and advise how to solve this issue.awaiting for reply Attachments nmain_layout4tab.zip nmain_layout4tab.zip 1.6 KB · Views: 298
We are developing an application that contain 80 layout for 600 X 1024 dimension.I would like to run the same application in 480 X 800 without changing in designer and code.How to fit (Autosize all view) for all device. see the attached example layout and advise how to solve this issue.awaiting for reply
Erel B4X founder Staff member Licensed User Longtime User Dec 7, 2011 #2 It will be easier if you post a screenshot of your current layout and the desired layout? Do you want to decrease the size of all views by code? Upvote 0
It will be easier if you post a screenshot of your current layout and the desired layout? Do you want to decrease the size of all views by code?
J junaidahmed Well-Known Member Licensed User Longtime User Dec 8, 2011 #3 I would like to resize all view from 600 X 1024 to 480 X 800 (decrease the size).Pls see attached file for screenshot layout and send me example code. Attachments Layout1.zip Layout1.zip 47.2 KB · Views: 317 Upvote 0
I would like to resize all view from 600 X 1024 to 480 X 800 (decrease the size).Pls see attached file for screenshot layout and send me example code.
Erel B4X founder Staff member Licensed User Longtime User Dec 8, 2011 #4 There is no magic. You need to programmatically go over the views and change their size and position to meet your needs. For example: Code: For i = 0 To Activity.NumberOfViews - 1 If Activity.GetView(i) Is Button Then Dim b As Button b = Activity.GetView(i) b.Width = b.Width * 0.75 b.Height = b.Height * 0.75 If b.Left > 50dip Then b.Left = 30dip End If Next Upvote 0
There is no magic. You need to programmatically go over the views and change their size and position to meet your needs. For example: Code: For i = 0 To Activity.NumberOfViews - 1 If Activity.GetView(i) Is Button Then Dim b As Button b = Activity.GetView(i) b.Width = b.Width * 0.75 b.Height = b.Height * 0.75 If b.Left > 50dip Then b.Left = 30dip End If Next