AccountPicker.AccountChooserOptions.Builder

public class AccountPicker.AccountChooserOptions.Builder


The builder for creating an instance of the AccountChooserOptions.

Summary

Public constructors

Public methods

AccountPicker.AccountChooserOptions

Builds an instance of AccountChooserOptions.

AccountPicker.AccountChooserOptions.Builder

A list of Accounts that limit the accounts that are shown in the Account Picker to those in this list.

AccountPicker.AccountChooserOptions.Builder

Sets the type of allowed types of accounts.

AccountPicker.AccountChooserOptions.Builder
@CanIgnoreReturnValue
setAlwaysShowAccountPicker(boolean alwaysShowAccountPicker)

If true then shows the Account Picker even if there is just one account to choose from.

AccountPicker.AccountChooserOptions.Builder

Sets the options to be passed as the addAccountOptions parameter in AccountManager#addAccount().

AccountPicker.AccountChooserOptions.Builder

Sets the specified account to "selected" in the Account Picker if this account is shown there.

AccountPicker.AccountChooserOptions.Builder

Overrides the default title of the Account Picker.

Public constructors

Builder

public Builder()

Public methods

build

public AccountPicker.AccountChooserOptions build()

Builds an instance of AccountChooserOptions.

setAllowableAccounts

@CanIgnoreReturnValue
public AccountPicker.AccountChooserOptions.Builder setAllowableAccounts(@Nullable List<Account> allowableAccounts)

A list of Accounts that limit the accounts that are shown in the Account Picker to those in this list.

setAllowableAccountsTypes

@CanIgnoreReturnValue
public AccountPicker.AccountChooserOptions.Builder setAllowableAccountsTypes(@Nullable List<String> allowableAccountTypes)

Sets the type of allowed types of accounts. If supplied, it limits the accounts to those that match the types in this list. This list is also used to filter the allowable account types if add account is selected.

setAlwaysShowAccountPicker

@CanIgnoreReturnValue
public AccountPicker.AccountChooserOptions.Builder setAlwaysShowAccountPicker(boolean alwaysShowAccountPicker)

If true then shows the Account Picker even if there is just one account to choose from.

setOptionsForAddingAccount

@CanIgnoreReturnValue
public AccountPicker.AccountChooserOptions.Builder setOptionsForAddingAccount(@Nullable Bundle options)

Sets the options to be passed as the addAccountOptions parameter in AccountManager#addAccount().

setSelectedAccount

@CanIgnoreReturnValue
public AccountPicker.AccountChooserOptions.Builder setSelectedAccount(@Nullable Account selectedAccount)

Sets the specified account to "selected" in the Account Picker if this account is shown there.

setTitleOverrideText

@CanIgnoreReturnValue
public AccountPicker.AccountChooserOptions.Builder setTitleOverrideText(@Nullable String titleOverrideText)

Overrides the default title of the Account Picker.