Android的ARC应用镀铬,窗不同的活动/布局的设置大小镀铬、布局、大小、不同

2023-09-06 22:39:06 作者:与君绝

对于那些谁不知道什么ARC是: https://developer.chrome.com/apps/getstarted_arc

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.

推荐答案

所述窗口的大小是不是每个活动*配置的,但方向是。在电弧焊机中的两个选项,控制窗口有:

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:

定位:这要么是风景或人像,这将是默认的方向为你的应用程序。但是,如果设置的 screenOrientation 的在您的的Andr​​oid活动,这可以覆盖每个活动的方向,与窗口旋转的补偿。有一个性能开销,以旋转的这种方式,因为这个插件将通过CSS。旋转 外形:这是一个电话 片或最大化。此控制您的应用程序的整体规模在全球范围。 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. Form Factor: This is one of phone, tablet, or maximized. This controls the overall size of your app globally.

*但对于Chrome浏览器42,最多可以使用元数据 {调整大小:重新配置} 来允许任意的用户的大小调整。你的应用程序必须能重新布局与各种在此模式下的长宽比和分辨率的

* 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.