开发者

Weird WebView behavior when playing Flash game

开发者 https://www.devze.com 2023-03-21 21:14 出处:网络
I\'m developing an Android app that embeds a Flash game in a WebView container. In particular, it\'s a Solitaire game that requires the user to drag cards around. In a WebView with specified width and

I'm developing an Android app that embeds a Flash game in a WebView container. In particular, it's a Solitaire game that requires the user to drag cards around. In a WebView with specified width and height, the card would get "stuck" as the user tries to drag it, rendering the game u开发者_开发知识库nplayable. However, I discovered that in full screen, finger dragging input works just fine. Does anyone have any insight regarding Flash Player behavior in WebView?


Use this in your webView

webView.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            v.onTouchEvent(event);
            return false;
        }
    });
0

精彩评论

暂无评论...
验证码 换一张
取 消