Android:将触摸传递给浮动视图下的视图(另一个应用程序)

Android: Pass touches to the view (Another App) under Floating view

感谢您阅读我的问题。 我做了一个浮动视图,里面有一个图像。 是半透明的。

我希望这个浮动视图只显示它的半透明图像,完全不打扰我。

Pass touches to the view under

我看过这篇文章,我已经完成了。 OnTouchListener -> OnTouch -> return 错误。 可点击 = 假,可聚焦 = 假。

但是触摸事件没有通过我的浮动视图。 有可能解决我的问题吗? 谢谢你。如果您能给我一个提示,我将不胜感激。

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:focusable="false"
    android:clickable="false">

...

        @TargetApi(Build.VERSION_CODES.FROYO)
        @Override
        public boolean onTouch(View v, MotionEvent event) {
            if(!activate){
                return false;
            }
        }

这不可能。应用程序之间的通信有限,没有触摸事件通信。