Most visited

Recently visited

Added in API level 23

PhoneAccount.Builder

public static class PhoneAccount.Builder
extends Object

java.lang.Object
   ↳ android.telecom.PhoneAccount.Builder


助手类创建 PhoneAccount

Summary

Public constructors

PhoneAccount.Builder(PhoneAccountHandle accountHandle, CharSequence label)

用指定的 PhoneAccountHandle和标签创建一个构建器。

PhoneAccount.Builder(PhoneAccount phoneAccount)

从现有的 PhoneAccount创建 PhoneAccount.Builder的实例。

Public methods

PhoneAccount.Builder addSupportedUriScheme(String uriScheme)

指定 PhoneAccount支持的其他URI方案。

PhoneAccount build()

基于当前的构建器设置创建 PhoneAccount的实例。

PhoneAccount.Builder setAddress(Uri value)

设置地址。

PhoneAccount.Builder setCapabilities(int value)

设置功能。

PhoneAccount.Builder setExtras(Bundle extras)

指定与 PhoneAccount关联的 PhoneAccount

PhoneAccount.Builder setHighlightColor(int value)

设置高亮颜色。

PhoneAccount.Builder setIcon(Icon icon)

设置图标。

PhoneAccount.Builder setShortDescription(CharSequence value)

设置简短说明。

PhoneAccount.Builder setSubscriptionAddress(Uri value)

设置订阅地址。

PhoneAccount.Builder setSupportedUriSchemes(List<String> uriSchemes)

指定 PhoneAccount支持的URI方案。

Inherited methods

From class java.lang.Object

Public constructors

PhoneAccount.Builder

Added in API level 23
PhoneAccount.Builder (PhoneAccountHandle accountHandle, 
                CharSequence label)

用指定的 PhoneAccountHandle和标签创建一个构建器。

Parameters
accountHandle PhoneAccountHandle
label CharSequence

PhoneAccount.Builder

Added in API level 23
PhoneAccount.Builder (PhoneAccount phoneAccount)

从现有的 PhoneAccount创建 PhoneAccount.Builder的实例。

Parameters
phoneAccount PhoneAccount: The PhoneAccount used to initialize the builder.

Public methods

addSupportedUriScheme

Added in API level 23
PhoneAccount.Builder addSupportedUriScheme (String uriScheme)

指定 PhoneAccount支持的其他URI方案。

Parameters
uriScheme String: The URI scheme.
Returns
PhoneAccount.Builder The builder.

build

Added in API level 23
PhoneAccount build ()

基于当前的构建器设置创建 PhoneAccount的实例。

Returns
PhoneAccount The PhoneAccount.

setAddress

Added in API level 23
PhoneAccount.Builder setAddress (Uri value)

设置地址。 getAddress()

Parameters
value Uri: The address of the phone account.
Returns
PhoneAccount.Builder The builder.

setCapabilities

Added in API level 23
PhoneAccount.Builder setCapabilities (int value)

设置功能。 getCapabilities()

Parameters
value int: The capabilities to set.
Returns
PhoneAccount.Builder The builder.

setExtras

Added in API level 24
PhoneAccount.Builder setExtras (Bundle extras)

指定与 PhoneAccount相关的 PhoneAccount

PhoneAccount唯一支持类型的额外价值: StringInteger ,并Boolean 没有这些类型的附加被忽略。

Returns
PhoneAccount.Builder

setHighlightColor

Added in API level 23
PhoneAccount.Builder setHighlightColor (int value)

设置高亮颜色。 getHighlightColor()

Parameters
value int: The highlight color.
Returns
PhoneAccount.Builder The builder.

setIcon

Added in API level 23
PhoneAccount.Builder setIcon (Icon icon)

设置图标。 getIcon()

Parameters
icon Icon: The icon to set.
Returns
PhoneAccount.Builder

setShortDescription

Added in API level 23
PhoneAccount.Builder setShortDescription (CharSequence value)

设置简短说明。 getShortDescription()

Parameters
value CharSequence: The short description.
Returns
PhoneAccount.Builder The builder.

setSubscriptionAddress

Added in API level 23
PhoneAccount.Builder setSubscriptionAddress (Uri value)

设置订阅地址。 getSubscriptionAddress()

Parameters
value Uri: The subscription address.
Returns
PhoneAccount.Builder The builder.

setSupportedUriSchemes

Added in API level 23
PhoneAccount.Builder setSupportedUriSchemes (List<String> uriSchemes)

指定 PhoneAccount支持的URI方案。

Parameters
uriSchemes List: The URI schemes.
Returns
PhoneAccount.Builder The builder.

Hooray!