安卓:Flash内容休息的WebView boundings和本地布局元素重叠 [英] Android: Flash content breaks WebView boundings and overlaps native layout elements

查看:209
本文介绍了安卓:Flash内容休息的WebView boundings和本地布局元素重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的WebView显示其中包含了一些Flash内容,基本上工作pretty的还有一个网页。 最大的问题是,该Flash内容似乎没有考虑到的WebView的boundings:即使web视图是太小,无法显示完整的网页和Flash内容是不是里面的WebView的boundings显示Flash内容。此外,这种Flash内容覆盖了显示旁边的WebView其他(本机)布局元素。 对我来说,这似乎是Flash内容在(特殊)Z-层,即覆盖所有其他布局元素呈现。

I'm using a WebView to display a web page which contains some Flash content which basically works pretty well. The big problem is, that the Flash content seems not to consider the WebView's boundings: The Flash content is displayed even if the WebView is too small to show the complete page and the Flash content is not inside the WebView's boundings. Moreover this Flash content overlays other (native) layout elements that are displayed next to the WebView. To me, it seems, that the Flash content is rendered in (special) z-Layer, that overlays all other layout elements.

与测试:Android 2.2及Flash 10.1的

Tested with: Android 2.2 and Flash 10.1.

这是在Adobe的Flash Player 10.1的一个已知的bug?

Is this a known bug in Adobes Flash player 10.1?

推荐答案

我有闪光灯同样的问题。我发现了什么是Flash观看中加入setZOrderOnTop设置为true。它会导致闪存呈现在所有窗口的顶部(如涉及其他本地布局元素)。

I had the same issue with flash. What I found out is that flash view is added with setZOrderOnTop set to true. It causes that flash is rendered on top of all windows (e.g. covers other native layout elements).

我有我自己的WebView类和我重写addView方法。当的WebView添加任何观点我检查它是否是一个Flash观看(通过检查com.adobe.flashplayer.FlashPaintSurface)。如果是我设置Z顺序为false:

I had my own WebView class and I overridden addView methods. When WebView adds any view I check if it is a flash view (by checking "com.adobe.flashplayer.FlashPaintSurface"). If it is I set Z order to false:

@Override
public void addView(View child, int index)
{
    if (child.getClass().getName().equals("com.adobe.flashplayer.FlashPaintSurface"))
    {
        ((SurfaceView)child).setZOrderOnTop(false);
    }

    super.addView(child, index);
}

我做的每addView方法。这对我的作品,我以为我会分享它。

I do it for every addView method. It works for me and I thought that I will share it.

这篇关于安卓:Flash内容休息的WebView boundings和本地布局元素重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆