I confirm the problem related by Harris here.
Attached the AutoScaleExample2 from the tutorial a little bit modified. Added some colors to better see what happens.
It works OK in both orientations on:
- Galaxy Note (5" phone)
- HTC One X (4.7" phone)
- Samsung I9000 (4" phone)
It works OK on my two devices:
- Nexus One (800 x 480 scale 1.5)
- Asus TF700 tablett (1920 x 1200 scale 1.5)
It works in landscape but not in portrait on:
- Nexus 7 (7" tablet)
It doesn't work well in both orientations on:
- Galaxy Tab 2 (10" tablet)
- Tablet Kindle Fire
The Designer Scripts code All variants:
The Designer Scripts code portrait:
The Designer Scripts code landscape:
I tried to copy the UI Cloud site but the images are too big.
Best regards.
Attached the AutoScaleExample2 from the tutorial a little bit modified. Added some colors to better see what happens.
It works OK in both orientations on:
- Galaxy Note (5" phone)
- HTC One X (4.7" phone)
- Samsung I9000 (4" phone)
It works OK on my two devices:
- Nexus One (800 x 480 scale 1.5)
- Asus TF700 tablett (1920 x 1200 scale 1.5)
It works in landscape but not in portrait on:
- Nexus 7 (7" tablet)
It doesn't work well in both orientations on:
- Galaxy Tab 2 (10" tablet)
- Tablet Kindle Fire
The Designer Scripts code All variants:
B4X:
'All variants script
AutoScaleRate(0.5)
AutoScaleAll
B4X:
'Variant specific script: 320x480,scale=1
'Center the Labels horizonally to the middle of the screen
lblTitle.HorizontalCenter = 50%x
lblSubTitle.HorizontalCenter = 50%x
'Center the ToolBox Panel horizonally to the middle of the screen
pnlToolBox.HorizontalCenter = 50%x
'Set the bottom ToolBox Panel border to the bottom screen border
pnlToolBox.Bottom = 100%y
'Center the ScrollView horizonally to the middle of the screen
scvTest.HorizontalCenter = 50%x
'The Scrollview fills the space between
'the bottom border of the SubTitle Label
'and 10dips above the top border of the ToolBox Panel
scvTest.SetTopAndBottom(lblSubTitle.Bottom + 10dip, pnlToolBox.Top - 10dip)
B4X:
'Variant specific script: 480x320,scale=1
'Center the ToolBox Panel vertically
pnlToolBox.VerticalCenter = 50%y
'Set the right ToolBox Panel border to the right screen border
pnlToolBox.Right= 100%x
'Center the Labels horizonally to the middle
'of the space between the left screen border
'and the left boarder of the ToolBox Panel
lblTitle.HorizontalCenter = pnlToolBox.Left / 2
lblSubTitle.HorizontalCenter = pnlToolBox.Left / 2
'Center the ScrollView horizonally to the middle
'of the space between the left screen border
'and the left ToolBox Panel border
scvTest.HorizontalCenter = pnlToolBox.Left / 2
'The Scrollview fills the space between
'the bottom SubTitle Label border
'and 10dips above the screen bottom border
scvTest.SetTopAndBottom(lblSubTitle.Bottom + 10dip, 100%y - 10dip)
Best regards.
Attachments
Last edited: