【问题标题】:Android How to add buttons in a simple notification?Android 如何在简单的通知中添加按钮?
【发布时间】:2013-08-15 02:05:11
【问题描述】:

我已经阅读了开发者文档,现在我学习了如何在大通知中添加按钮。

mBuilder.addAction(R.drawable.ic_update_normal, "action",getPendingIntent());

但是如何在简单的通知中添加按钮?就像音乐应用中的控制按钮一样。

google了半天,求大神帮忙,谢谢!

【问题讨论】:

    标签: android notifications android-4.2-jelly-bean android-notifications android-notification-bar


    【解决方案1】:

    我想你可以做一个客户布局,然后使用 layoutinflater 膨胀视图,最后,你可以将膨胀的视图添加到通知中,希望有所帮助。

    【讨论】:

    • 我觉得不是自定义布局,通知栏自定义布局很难匹配系统风格。谢谢
    猜你喜欢
    • 1970-01-01
    • 2013-04-18
    • 1970-01-01
    • 1970-01-01
    • 2014-08-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-09
    相关资源
    最近更新 更多