安卓:添加一个状态栏通知的按钮 [英] Android: Adding a button on a status bar notification

查看:152
本文介绍了安卓:添加一个状态栏通知的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建具有除了文本的按钮自定义状态栏通知中的Andr​​oid。该按钮可以做不同的事情莫过于当你点击该通知本身。 这是可能的吗?我也没事把一个按钮的图像有代替。我知道如何把图像,但不知道如何处理的OnClick嵌入在RemoteViews的图像。你的帮助是真诚的AP preciated。

I am trying to create a custom status bar notification in Android that has a button in addition to the text. The button can do a different thing than when you click the notification itself. Is this possible at all? I'd also be ok putting an image of a button there instead. I know how to put an image, but not sure how to handle OnClick for an image embedded in RemoteViews. Your help is sincerely appreciated.

感谢很多提前。

推荐答案

我不认为你可以在状态栏本身就是一个按钮,但你一定可以做到这一点使用自定义扩展视图(见的 http://developer.android.com/guide/topics/ui/notifiers/notifications.html

I don't think you can get a button on the status bar itself but you can certainly do it using a Custom Expanded View (see http://developer.android.com/guide/topics/ui/notifiers/notifications.html)

这篇关于安卓:添加一个状态栏通知的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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