Android Question Scale oddity

CurtisC

Member
Licensed User
Longtime User
I have 11 apps set up to be exactly the same. SupportedOrientations are all set to landscape in Project Attributes. #FullScreen: are set to True and #IncludeTitle: are set to False in Region, and Show Title are set to False and Full Screen are set to True in Activity Properties. Alyout Variants were all set at 1920 x 1080 scale = 1 (160 dpi).


They are being used on 20.5" Acer, View Sonic at 1080 x 1920 with a scale of 1 and a mix of tablets with of the same size and scale, and HTC Droid 1080 x 1920 with a scale of 3. The Acer and View Sonic states 1032 x 1920 with GetDeviceLayoutValues while the HTC states 1080 x 1920.


The space used by the HTC control bar is not being recognized. A problem that can be handled if consistent. But it is not. The control bar remains and the large devices and the space is already deducted in the GetDeviceLayoutValues height. On the HTC Droid The control bar remains on 7 out of the 11 apps and the screens appear to be about 48 pixels too tall but with 4 out of the 11 apps the bar is gone and the screens appear to fit correctly. If I compensate for the 7 apps then the 4 apps are too short.


Any advice and are the control bars not deducted from the height on phones?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
GetDeviceLayoutValues returns the screen dimensions. You need to use 100%x / 100%y to find the activity size.

However it is better not to use these values and instead use anchors, autoscale and designer script to make your layout flexible.

In this case you should probably use two variants. One for a phone size device and one for the 20" devices.
 
Upvote 0

CurtisC

Member
Licensed User
Longtime User
Thank you Erel your help is very appreciated.

I did create a second variant for less than 5". I am using anchors and scripts because I am trying to be capable beyond just 1920 x 1080 screens. Aren't the anchors, autoscale and designer scripts based on GetDeviceLayoutValues height and weight. If so then won't oversize or under size continue if some devices deduct the control panel and other devices do not? If all phone size devices do not deduct the control panel while the larger devices do then great we can compensate but is that the case?
 
Upvote 0
Top