Smart Device Platforms

Official Content
This documentation is valid for:

There are many Smart Devices that support different operating systems, screen sizes, aspect ratios, resolutions and densities, among other things. These features often change the type and volume of data to be displayed on them; for example, I may want to change an image or a font depending on the target operating system.

In order to simplify the way we model all these features, GeneXus has introduced the 'Platform' concept in Smart Device Settings. Each SD Panel or component (List, Detail, Section) in a WWSD instance can have multiple layouts and they are associated with a certain platform.

Create an SD Platform

To create a new Platform go to “Preferences/Patterns/Work With for Smart Devices", right-click on Platforms and select "Add/Platform".

Create SD Platform

General Platform properties:

Name Platform name
OS Target OS for this platform. Values: All, Android, iOS, Blackberry
Version The version name has the format x.y.z, where x, y, and z define the version name (for example: 4.1.2). All devices with the same OS and equal or greater versions use this platform definition
Size Screen size and resolution. Values: All, Small (phones), Medium (7'' tablet), Large (10'' tablet)
Theme Theme for Smart Devices object that is used to draw fonts, colors, etc.
Navigation Style Default navigation style for layouts defined with this platform
Minimum Shortest Bound If specified, this value represents the minimum size -width or height- in dips for which the platform applies
Maximum Shortest Bound If specified, this value represents the maximum size -width or height- in dips for which the platform applies
Minimum Longest Bound If specified, this value represents the minimum size -width or height- in dips for which the platform applies. This property is only visible when OS = iOS.
Maximum Longest Bound If specified, this value represents the maximum size -width or height- in dips for which the platform applies

 

Example

We create two new platforms for iOS versions 6.0.x and 6.1.x.

Properties create platform

In an SD Panel we generate two layouts for each platform and insert an image in each one.

Layout iOS 6 and 7

Create Layout iOS 6 and 7 image

When we run the application on our device, the layout corresponding to our OS version will be displayed.

App iOS6 and 7




Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.