如何实现一个滑出式抽屉的Andr​​oid的电话屏幕上的? [英] How do I implement a slide-out drawer on the Android's call screen?

查看:115
本文介绍了如何实现一个滑出式抽屉的Andr​​oid的电话屏幕上的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.

看看<一href="http://stackoverflow.com/questions/6371432/how-to-display-a-fullscreen-type-system-alert-window">How显示全屏TYPE_SYSTEM_ALERT窗口?的,特别是<一个href="http://stackoverflow.com/questions/4750814/creating-a-system-overlay-where-the-home-buttons-still-work">Creating一个系统的覆盖,其中主场按钮仍然有效?

这篇关于如何实现一个滑出式抽屉的Andr​​oid的电话屏幕上的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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