Col*_*ire 8 android android-7.0-nougat
我刚刚从API 23将编译sdk版本升级到API 24,似乎Notification.bigContentView已弃用.
那么问题是什么是API 24中的等效方法在Android API 24(Nougat)中设置bigContentView?
Col*_*ire 12
该NotificationBuilderCompat有一个新的方法setCustomBigContentView()
在V4支持库24.
您可以使用此方法来避免已弃用的警告,并且该方法是向后兼容的.
引用文档:
从N开始,该字段可以为空.扩展通知视图由输入确定Notification.Builder; 可以选择提供自定义RemoteView setCustomBigContentView(RemoteViews).
https://developer.android.com/reference/android/app/Notification.html#bigContentView
| 归档时间: |
|
| 查看次数: |
4545 次 |
| 最近记录: |