如何在Android中实现“弹出框”,类似于Viber(收到消息时) [英] How to implement 'pop up box' in Android similar to Viber (when a message is received)

查看:183
本文介绍了如何在Android中实现“弹出框”,类似于Viber(收到消息时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名初级Android开发人员,客户已经请求了以下内容:

I work as a junior Android developer and the client has requested the following:

研究弹出框的实现,而应用程序是在后台想法总是在通知面板中显示通知时,也要在弹出框中显示。 (Viber被视为这个例子)

"Make research about implementation of pop up box, while application is in background. Thea idea is always when there is notification to show in notification panel, also to be shown in pop up box." (Viber was taken as an example of this)

我知道如何使用Android中的活动和片段和视图,但我不知道如何甚至谷歌这样我就以为有人可以指出一个教程,或者说如果这个技术有一个字,我可以研究一下。当接收到新消息(广播接收器)时,弹出框显示在Android系统的顶部。我的问题是什么是模式,什么是实现此功能的关键点。谢谢你提前

I know how to work with activities and fragments and views in Android, but I don't know how to even google about this so I thought someone could point out a tutorial or just say if there is a word for this technique so I can study it. When a new message is received (Broadcast Receivers) the 'pop up box' is shown on top of the Android system. My question would be what is the pattern and what are the key pointss in implementing this feature. Thank you in advance

推荐答案

很简单。

您只需创建活动扩展对话框类型。

所以你的活动类型应该在上面的活动对话框中显示为图像。

So your activity type should show as image in above - the activity dialog.

这篇关于如何在Android中实现“弹出框”,类似于Viber(收到消息时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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