4

For those who dont know what ARC is: https://developer.chrome.com/apps/getstarted_arc

How does one manually set the size of the window depending on what activity is running or what layout is visible?

For instance this activity is too tall, and wide. While I would like the next activity to be full screen.

enter image description here

enter image description here

hichris123
  • 10,145
  • 15
  • 56
  • 70
BillHaggerty
  • 6,157
  • 10
  • 35
  • 68

2 Answers2

6

The size of the window is not configurable per activity*, but the orientation is. The two options in ARC Welder that control the window are:

  1. Orientation: This is either landscape or portrait, which will be the default orientation for your app. However, if you set a screenOrientation on your Android activity, this can override the orientation per activity, with the window rotating to compensate. There is a performance cost to rotating this way because the plugin will be rotated via CSS.
  2. Form Factor: This is one of phone, tablet, or maximized. This controls the overall size of your app globally.

* but for Chrome 42 and up you can use the metadata {"resize": "reconfigure"} to allow arbitrary user resizing. Your app must be able to relayout with a variety of aspect ratios and resolutions in this mode.

tasomaniac
  • 10,234
  • 6
  • 52
  • 84
Elijah Taylor
  • 519
  • 2
  • 6
  • I know about this but I was hoping there was a way to have more control. I will leave this question open for a bit in hopes that new information will surface. I was hoping to have different form factors for different windows. – BillHaggerty Apr 03 '15 at 13:04
  • 1
    Different form-factors per activity is not supported. You can try {'resize': 'reconfigure'} metadata which on Chrome 42+ will let the user drag the window to resize and relayout your app, but that is the only window resizing that is supported. – Elijah Taylor Apr 03 '15 at 17:06
  • Please add {"resize": "reconfigure"} to your answer. I think it is an appropriate solution to my second activity example. – BillHaggerty Apr 03 '15 at 18:21
1

you can also set the app fullscreen globally with"formFactor": "fullscreen"though i'm not user if this can be triggered by the user like "resize":"reconfigure"

Fuseteam
  • 376
  • 2
  • 15