为什么需要 NotificationCompat? [英] Why is NotificationCompat needed?
问题描述
具体来说,我认为使用 NotificationCompat 完成的任何事情都可以使用默认 API(级别 8)完成.我在这里错过了什么?NotificationCompat 引入了哪些使用 2.2 API 无法完成的功能?
Specifically, I think anything done with NotificationCompat can be done using the default API (level 8). What am I missing here? What does NotificationCompat introduce that cannot be done using 2.2 API?
来源:http://developer.android.com/sdk/compatibility-library.html#Notes
推荐答案
您可以使用 NotificationCompat.Builder#setLargeIcon(Bitmap) 之类的东西来让您充分利用 Android 3.0+ 的大图标之类的东西,同时保持与不支持此类内容的 3.0 之前的 Android 版本兼容.
You can use things like NotificationCompat.Builder#setLargeIcon(Bitmap) to allow you to take full advantage of Android 3.0+ with things like the large icon, while maintaining compatibility on versions of Android prior to 3.0 that do not support such things.
这篇关于为什么需要 NotificationCompat?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!