Partager via


Notification.Builder.CreateContentView Method

Definition

Construct a RemoteViews representing the standard notification layout.

[Android.Runtime.Register("createContentView", "()Landroid/widget/RemoteViews;", "GetCreateContentViewHandler", ApiSince=24)]
public virtual Android.Widget.RemoteViews? CreateContentView ();
[<Android.Runtime.Register("createContentView", "()Landroid/widget/RemoteViews;", "GetCreateContentViewHandler", ApiSince=24)>]
abstract member CreateContentView : unit -> Android.Widget.RemoteViews
override this.CreateContentView : unit -> Android.Widget.RemoteViews

Returns

Attributes

Remarks

Construct a RemoteViews representing the standard notification layout.

This member is deprecated. For performance and system health reasons, this API is no longer required to be used directly by the System UI when rendering Notifications to the user. While the UI returned by this method will still represent the content of the Notification being built, it may differ from the visual style of the system.

NOTE: this API has always had severe limitations; for example it does not support any interactivity, it ignores the app theme, it hard-codes the colors from the system theme at the time it is called, and it does Bitmap decoding on the main thread which can cause UI jank.

Java documentation for android.app.Notification.Builder.createContentView().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to