Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ARC app for chrome, set size of windows for different Activities/Layouts

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

like image 949
BillHaggerty Avatar asked Mar 16 '23 13:03

BillHaggerty


1 Answers

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.

like image 162
Elijah Taylor Avatar answered Apr 27 '23 05:04

Elijah Taylor