Screen orientation (manual)

Printer-friendly versionSend to friendPDF version
Intermediate

This sample code has been developed by Streamezzo.
Its purpose is to illustrate how to manage screen orientation (portrait / landscape) in MANUAL mode, i.e. driven by the application itself.

In order to emulate this poroject you will need to:

  • enable Screen Orientation in the Emulation > Options menu
  • set it to "Manual"
  • set initial orientation to portrait

Important note:
By default screen orientation is not activated for devices. Enabling screen orientation requires custom device packages with specific options activated.
Use Devices > Rich Media Client customizations... to specify such customization. Then use Service > Create Client Package and select the specified customization to obtain such device packages.

<%@ page import="java.lang.Math" %> <% int screenWidth = userAgent.getScreenWidth(); int screenHeight = userAgent.getScreenHeight(); // Important: content is designed as a square box which elements will be displayed or not in either portrait or landscape orientation int screenDimension = Math.max(screenWidth, screenHeight); %>
"/> "> "> "> "> "/> "/>
AttachmentSize
Screen_orientation_manual.swz10.72 KB
Share this