Flash в Android WebView - проблема с наслоением

I am trying to have interactive buttons in an android WebView that contains flash. As a test, I set up a HTML to load in a flash through with a set x/y size.

public class webz extends WebView {
private Drawable image;
public webz(Context context, AttributeSet attrs) {
    super(context, attrs);
    image=context.getResources().getDrawable(R.drawable.icon);
    getSettings().setPluginsEnabled(true);
}
@Override
protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);
    image.setBounds(100, 300, 150, 450);
    image.draw(canvas);
}

}

I set up a test image that would overlay itself half over the flash, half over the unused canvas. once loaded, the flash will load over the canvas draw, leaving only the part over the HTML.

LINK TO SCREENSHOT

the answer to this question states that adobe's flash player creates a surfaceview inside of the webview. i assume this is the cause of the layering issue, but i have no idea how to overcome it.

does anyone know how to override this? the button has to also send key events to the flash (like you press the on screen button, and the A key to sent to the flash). if you know how to do this as well, it would be very helpful

8
задан Community 23 May 2017 в 12:13
поделиться