API 级别 10 中的自定义大通知

Custom Big Notification In API level 10

我正在为通知使用自定义视图。
在这种情况下,我知道对于大尺寸通知,我必须使用 bigContentView 并为其设置大视图。 API 16 中的一切都很好,但是我的应用程序最低 SDK 是 API 级别 10,并且 API 级别 10 不支持 bigContentView

myNotification= notification.setContentTitle("some string")
            .setContentText("some text")
            .setSmallIcon(R.mipmap.ic_launcher)
            .build();

RemoteViews notificationView = new RemoteViews(MyApp.getAppContext().getPackageName(),
            R.layout.custom_notification_layout);

myNotification.bigContentView=notificationView; //Error in this line!

有没有其他方法可以显示自定义通知的大布局?
或者是 bigContentView 的旧版本?

通知的大视图在 android 4.1 中引入,旧设备不支持它们。 (正如@Pop Tudor 评论的那样)

  • 如果api级别高于15,我们可以通过bigContentView(RemteView)使用它进行通知。

  • 在API 15或更低版本中,我们只能通过contentView(View)方法设置通知的自定义视图。