通知,如whatsapp或sms应用程序android [英] Notification like whatsapp or sms app android
问题描述
我想创建一个类似于whatsapp或sms通知的通知视图.我该如何实现.
I want to create a Notification view just like whatsapp or sms notification.How can i achieve that.
到目前为止我所搜索的内容
What I have search till now
面包:可以在此处找到
这将在跑步活动中以及操作栏下方显示一个油煎面包块. 如果我的活动未运行,或者我正在进行其他活动,该如何处理.
this will show a crouton at running activity and below to the action bar. if my activity not running or i am on the other activity how can this handle.
吐司: 这看起来不像烤面包.它仅显示在底部或中心.
Toast: this is not looking like a toast. It show only on bottom or center .
对话框: 可以这样做,但这会使应用程序模糊.并禁用背景.而且我不想要这个
Dialog: this can be done like this but this will blur the application. and disable the background. And i don't want this
任何解决方案将不胜感激.
Any solution will appreciated.
谢谢
推荐答案
在平视通知"(在Android 4.3之后添加的功能)上方的图像中查看的内容
what you are looking in the image above "heads up notificcation" (feature added after android 4.3)
link:抬头通知
将通知的优先级设置为较高,以便将其显示在屏幕头部 希望对您有帮助
set priority of notification as high so as to display it on screen head hope this helps
这篇关于通知,如whatsapp或sms应用程序android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!