Android应用Thrutu把一个抽屉上的呼叫屏幕,具有多种功能,只需要在屏幕的一小部分的顶部。下面还是呼叫控制按钮的功能完全正常。即使是一个透明的活动将不会允许这种行为。如何实现这个你知道吗?
The Android app Thrutu puts a drawer on top of the in call screen which has several functions and only takes up a fraction of the screen. The call control buttons below still are fully functional. Even a transparent activity would not allow this behaviour. Any idea on how to implement this?
诀窍使底层按钮的工作是使用服务,而不是一个活动来实现用户界面,使窗口添加(使用WindowManager.addView)一优先级较高的类型(如TYPE_PHONE)中,然后用FLAG_NOT_TOUCH_MODAL。
The trick to making the underlying buttons work is to implement the UI using a Service rather than an Activity, make the Window you add (using WindowManager.addView) one of the higher-priority types (e.g. TYPE_PHONE), then use FLAG_NOT_TOUCH_MODAL.
我的认为的需要android.permission.SYSTEM_ALERT_WINDOW。
I think you need android.permission.SYSTEM_ALERT_WINDOW.
看看How显示全屏TYPE_SYSTEM_ALERT窗口?的,特别是Creating一个系统的覆盖,其中主场按钮仍然有效?