语言

Notification.MessagingStyle.SetConversationTitle 方法

定义

重载

名称 说明
SetConversationTitle(ICharSequence)

设置要在此对话中显示的标题。

SetConversationTitle(String)

设置要在此对话中显示的标题。

SetConversationTitle(ICharSequence)

设置要在此对话中显示的标题。

[Android.Runtime.Register("setConversationTitle", "(Ljava/lang/CharSequence;)Landroid/app/Notification$MessagingStyle;", "GetSetConversationTitle_Ljava_lang_CharSequence_Handler", ApiSince=24)]
public virtual Android.App.Notification.MessagingStyle? SetConversationTitle(Java.Lang.ICharSequence? conversationTitle);
[<Android.Runtime.Register("setConversationTitle", "(Ljava/lang/CharSequence;)Landroid/app/Notification$MessagingStyle;", "GetSetConversationTitle_Ljava_lang_CharSequence_Handler", ApiSince=24)>]
abstract member SetConversationTitle : Java.Lang.ICharSequence -> Android.App.Notification.MessagingStyle
override this.SetConversationTitle : Java.Lang.ICharSequence -> Android.App.Notification.MessagingStyle

参数

conversationTitle
ICharSequence

CharSequence:为此对话显示的标题。 此值可能为 null。

返回

此方法链接的此对象

特性

注解

设置要在此对话中显示的标题。 可能设置为 null。 从Build.VERSION_CODES开始。如果通过 Notification.Builder.setShortcutId(String)添加有效的 shortcutId,则忽略此会话标题。 在这种情况下,ShortcutInfo.getLongLabel() (或者,如果缺少,ShortcutInfo.getShortLabel()将改为显示为对话标题。 SDK 版本 Build.VERSION_CODES.P 中更改了此 API 的行为。 如果应用程序的目标版本小于Build.VERSION_CODES。P,将会话标题设置为非 null 值将使 isGroupConversation() 返回 true,传递 null 将使它返回 false。 在Build.VERSION_CODES。P 及更高版本,使用 setGroupConversation(boolean) 设置组会话状态。

Android 参考。android.app.Notification.MessagingStyle.setConversationTitle

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

SetConversationTitle(String)

设置要在此对话中显示的标题。

public Android.App.Notification.MessagingStyle? SetConversationTitle(string? conversationTitle);
member this.SetConversationTitle : string -> Android.App.Notification.MessagingStyle

参数

conversationTitle
String

CharSequence:为此对话显示的标题。 此值可能为 null。

返回

此方法链接的此对象

注解

设置要在此对话中显示的标题。 可能设置为 null。 从Build.VERSION_CODES开始。如果通过 Notification.Builder.setShortcutId(String)添加有效的 shortcutId,则忽略此会话标题。 在这种情况下,ShortcutInfo.getLongLabel() (或者,如果缺少,ShortcutInfo.getShortLabel()将改为显示为对话标题。 SDK 版本 Build.VERSION_CODES.P 中更改了此 API 的行为。 如果应用程序的目标版本小于Build.VERSION_CODES。P,将会话标题设置为非 null 值将使 isGroupConversation() 返回 true,传递 null 将使它返回 false。 在Build.VERSION_CODES。P 及更高版本,使用 setGroupConversation(boolean) 设置组会话状态。

Android 参考。android.app.Notification.MessagingStyle.setConversationTitle

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于