Share via


Activity.OnCreateDescription Method

Definition

Generate a new description for this activity.

public string? OnCreateDescription ();
member this.OnCreateDescription : unit -> string

Returns

A description of what the user is doing. It should be short and sweet (only a few words).

Remarks

Generate a new description for this activity. This method is called before stopping the activity and can, if desired, return some textual description of its current state to be displayed to the user.

The default implementation returns null, which will cause you to inherit the description from the previous activity. If all activities return null, generally the label of the top activity will be used as the description.

Java documentation for android.app.Activity.onCreateDescription().

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