通过来电屏幕弹出 [英] Popup over incoming-call screen

查看:170
本文介绍了通过来电屏幕弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在android的来电屏幕上创建一个自定义的弹出窗口,我希望为用户添加信息。
我希望弹出窗口不要从背景中禁用任何可点击,以便用户仍然可以接听电话。

I want to create a customized popup over the android's incoming call screen where I wish to add information for the user. I want the popup to not disable any clickability from the background so that the user could still answer the call.

我知道这是可能的,因为许多应用程序它,例如 MeZeZe应用程序

I know it is possible since many applications do it, e.g. MeZeZe app:

更多信息


  1. 一个半透明的主题没有起作用,因为它取消了以前活动的可点击性。

  2. 吐司不是一个选择 - 我不想让它消失。

  3. 我知道有很多类似的主题 - 我读了很多,没有回答我的具体问题。

  4. 一旦接听电话,我已经知道如何发生事情,所以不需要INCOMING_CALL活动提示。

  1. A translucent theme did not work since it cancels the former activity's clickability.
  2. A toast is not an option - I don't want it to disappear.
  3. I know there are many similar threads - I read many of them and none answer my specific problem.
  4. I already know how to "make something happen" once a call is receiver, so no need for INCOMING_CALL activity tips.

任何帮助!
谢谢

Would appreciate any help! Thanks

推荐答案

如果您想保持呼叫活动仍然可点击,但没有任何控件覆盖,您可以通过调用

If you want to keep the Call activity still clickable, but not have any controls on your overlay, you can do this by calling

getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);

在通过调用显示的活动的onCreate()方法中。

In the onCreate() method of the activity that is shown over the call.

可以一起使用的布局参数是:

The layout parameters useable together with this are:

android:windowBackground="@android:color/transparent" 
android:windowIsTranslucent="true" 
android:windowAnimationStyle="@android:style/Animation.Translucent"

这篇关于通过来电屏幕弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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