1

我有点难过。

我已经为我的所有活动添加了多窗口支持intent-filter

  <intent-filter>
     <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
  </intent-filter>

例子:

<activity
    android:name="xx.Rights"
    android:label="@string/title_activity_rights"
    android:parentActivityName="xx.MainActivity"
    android:screenOrientation="portrait"
    android:theme="@style/AppTheme.NoActionBar">
    <intent-filter>
        <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
    </intent-filter>
    <meta-data
        android:name="android.support.PARENT_ACTIVITY"
        android:value="xx.MainActivity" />
</activity>

我已经添加了库支持

 <uses-library android:required="false" android:name="com.sec.android.app.multiwindow" />
 <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />

分屏效果很好。我可以在我的 Galaxy S7 上创建半手机分屏以及弹出视图。但是在长时间使用后,多次弹出或分屏 - 我的分屏或弹出功能突然停止。

(ActivityName) does not support split screen view无论我参加什么活动,我都会收到祝酒词。所有活动都经过测试并在某个时候起作用。不知道是什么触发了这个停止。

这是我在成功和失败使用期间的 Logcats。

分屏

12-21 10:58:34.706 11166-11166/xx D/ViewRootImpl: #3 mView = null
12-21 10:58:36.546 11166-11166/xx D/ViewRootImpl: MSG_RESIZED: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
12-21 10:58:36.546 11166-11166/xx D/ViewRootImpl: MSG_RESIZED: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1

返回全屏

12-21 11:00:51.056 18608-18608/xx D/ViewRootImpl: ViewPostImeInputStage processPointer 0
12-21 11:00:51.196 18608-18608/xx D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
12-21 11:00:51.856 18608-18608/xx D/ViewRootImpl: ViewPostImeInputStage processPointer 1

激活新活动,突然无法在任何地方使用分屏。

12-21 11:01:57.316 18608-18608/xx I/Timeline: Timeline: Activity_launch_request id:xx time:310566034
12-21 11:01:57.356 18608-18608/xx W/ResourcesManager: getTopLevelResources: /data/app/xx-1/base.apk / 1.0 running in xx rsrc of package xx
12-21 11:01:57.356 18608-18608/xx D/RelationGraph: garbageCollect()
12-21 11:01:57.356 18608-18608/xx W/ResourcesManager: getTopLevelResources: /data/app/xx-1/base.apk / 1.0 running in xx rsrc of package xx
12-21 11:01:57.386 18608-18608/xx D/Activity: performCreate Call Injection manager
12-21 11:01:57.386 18608-18608/xx I/InjectionManager: dispatchOnViewCreated > Target : xx.Rights isFragment :false
12-21 11:01:57.386 18608-18608/xx D/SecWifiDisplayUtil: Metadata value : SecSettings2
12-21 11:01:57.386 18608-18608/xx D/ViewRootImpl: #1 mView = com.android.internal.policy.MultiPhoneWindow$MultiPhoneDecorView{a0e161c I.E...... R.....ID 0,0-0,0}
12-21 11:01:57.436 18608-18608/xx I/InjectionManager: dispatchCreateOptionsMenu :xx.Rights
12-21 11:01:57.436 18608-18608/xx I/InjectionManager: dispatchPrepareOptionsMenu :xx.Rights
12-21 11:01:57.436 18608-18608/xx W/DisplayListCanvas: DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
12-21 11:01:57.446 18608-18608/xx D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
12-21 11:01:57.476 18608-18608/xx I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@ca335b6 time:310566192
12-21 11:01:57.736 18608-18608/xx V/ActivityThread: updateVisibility : ActivityRecord{6e259ab token=android.os.BinderProxy@ce5aea5 {xx/xx.MainActivity}} show : false
12-21 11:01:59.486 18608-18608/xx D/ViewRootImpl: ViewPostImeInputStage processPointer 0
12-21 11:02:01.226 18608-18608/xx D/ViewRootImpl: ViewPostImeInputStage processPointer 1

任何想法表示赞赏。

谢谢。

4

0 回答 0