Phone agent screen width

I’m starting to experiment with screen agents. I created the to different versions of my screen and the respective screens do show up on my desktop and phone. The issue I face is that when the app is opened on my phone, the main menu dimensions are wider than my physical screen. How can I set the absolute width of the main menu (and therefore all my other screens) to match the physical resolution of my phone’s display?

Using Galaxy Note 4 for testing.

Hi,

By default we do not use meta tags to tune view port on mobile devices. There are application properties that can be used to change this behaviour:

  1. cuba.web.useDeviceWidthForViewport - is true then device real width will be used for viewport. (false by default)
  2. cuba.web.pageInitialScale- initial scale level of page
  3. cuba.web.customDeviceWidthForViewport - custom width for device view port (-1 by default)

You can set cuba.web.useDeviceWidthForViewport to true in your web-app.properties file and device screen width will be equal to real device width.

These properties affect meta tags of HTML page that are relevant for mobile devices.

See also this answer Dashboard BootstrapListener - CUBA.Platform

1 Like