Article ID: 10292
INFO: Creating Layouts for Android devices with VGA displays
INFO
Applies To: ITScriptNet Indago

We often recommend that you design your programs with half-size layouts in the Program Designer, to make design easier, and let the client scale up on the actual device.  For example, you can design programs for Windows Mobile devices at 320x240, and the client will scale up to 640x480 on VGA devices.

Some Android devices with VGA displays have problems with this technique, as part of the screen is reserved for the Android system area where the Home and Back buttons are located.  Devices with VGA displays are generally dual-OS devices that can come with either Windows Mobile or Android, such as the Zebra (Motorola/Symbol) MC92N0.  Programs designed for 320x240 will not automatically scale up on these devices, and the prompt will be shrunk to only the upper left corner of the screen. 

Here is an example of a program with a 320x240 layout:

DETAILS

The ITScriptNet Indago Client determines the layout to use and the scaling to use by comparing each layout's size to the physical screen size reported by the OS, and looking for exact matches or exact multiple matches.  On most Android devices, the OS reports a screen size slightly smaller than the physical screen size, and reserves a small area for the system buttons.  You can see this on the client's Configuration screen, where the screen size is reported.

The client will only scale a layout if the screen size is an exact multiple of the layout size.  For example, 320x240 scales x2 on a 640x480 display.  However, if the OS reports a smaller screen size, such as 586x480 on a VGA Android device, then the layout can't scale because 586 is not a multiple of 320.

The solution is to look at the Configuration screen and see what the OS reports the screen size to be, and create a layout to match.  So, if the screen size is reported as 586x480, then a layout size of 293x240 will scale x2 on the device.

Here is what that will look like:


This article last updated: 10/6/2016 2:50:05 PM
Please help us improve the Knowledge Base by rating this article.
    © 1997-2024 Z-Space Technologies - a BCA Innovations Company - All rights reserved