Platform- and device-specific files
The last method to differentiate between platforms is through platform- and device-specific files. These qualifiers are applicable to JavaScript, CSS, and the Declarative UI XML files. You can prefix the extension of a file with .android
or .ios
, so the file is
main-file.ios.js
or main-file.android.xml
. Then, only this version of the file will be loaded on that specific platform. Once the version is loaded it allows you to have a completely custom JavaScript, CSS, or Declarative UI for each platform.
In addition to the platform qualifiers, you can also use device qualifiers such as .land
for landscape or .port
for portrait. For screen sizes, the qualifiers minH
, min
, and minWH
appended with a minimum number of pixels are used as qualifiers. So, the main-page.minH300.css
would require the device to have at least 300 pixels height for this CSS file to load. The .
minHW400
qualifier would require that both the width and height be greater or equal to 400 pixels...