Chromebook上的WebView刷新最大化/最小化



我在我的Android应用中有一个WebView。我在同一WebView中导航到其他页面。我按F4,这是Asus Chromebook上的全屏按钮。WebView重新加载,然后回到第一页。

我尝试添加

<activity android:configChanges="orientation|screenSize">

我在清单中的活动。但是问题仍然存在。

WebView在片段中,如果很重要。我也有

setRetainInstance(true)

在我的片段中保留WebView状态。

我猜想最大化和最小化Chromebook Windows与普通平板电脑的方向更改不同。因为我已经锁定了肖像的方向并将其在平板电脑上测试,但看不到相同的行为。

所以看起来我正在用Android 6.0内置的Chromebook进行测试。对于Android开发人员网站的6.0,

These apps are treated as unsafe to be resized. If possible, these apps launch by default to a phone-sized portrait window; otherwise they launch into a phone-sized landscape window. 
The user can press F4 to enter or leave full screen mode which fully restarts the app—killing and starting the app anew—and keeps it from then on in full screen portrait-sized (or rotated into landscape). 

因此,它总是杀死并重新启动我的应用程序。

最新更新