Facebook共享对话框上的浮动窗口叠加

时间:2018-01-19 09:19:42

标签: android facebook

我已经实现了一个浮动窗口,并通过WindowManager使用以下参数插入它:

mParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
mParams.format = PixelFormat.RGBA_8888;
mParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL |
                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR |
                WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
mFloatingManager.updateView(mView, mParams);

在此视图中,还有一个Facebook分享按钮。我使用以下代码打开facebook share对话框:

for (final ResolveInfo app : activityList)
{
    if ((app.activityInfo.name).contains("facebook.composer.shareintent"))
    {
        final ActivityInfo activity = app.activityInfo;
        final ComponentName name = new ComponentName(activity.applicationInfo.packageName, activity.name);
        shareIntent.addCategory(Intent.CATEGORY_LAUNCHER);
        shareIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_ACTIVITY_NEW_TASK);
        shareIntent.setComponent(name);
        context.startActivity(shareIntent);
        break;
    }
}

然而,我的浮动视图覆盖在facebook分享对话框上,这不是我的意图; Facebook共享对话框应覆盖在我的浮动视图上。有办法解决吗?

0 个答案:

没有答案