WalletFragmentOptions.Builder | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Methods | Inherited Methods | [Expand All]
public final class

# WalletFragmentOptions.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.wallet.fragment.WalletFragmentOptions.Builder

## Class Overview

Builder for building `WalletFragmentOptions`.

## Summary

Public Methods
WalletFragmentOptions | build()
WalletFragmentOptions.Builder | setEnvironment(int environment) Sets the Google Wallet environment to use.
WalletFragmentOptions.Builder | setFragmentStyle(int styleResourceId) Sets a set of attributes to customize the look and feel of the UI components of a `WalletFragment`.
WalletFragmentOptions.Builder | setFragmentStyle(WalletFragmentStyle fragmentStyle) Sets a set of attributes to customize the look and feel of the UI components of a `WalletFragment`.
WalletFragmentOptions.Builder | setMode(int mode) Sets the mode of the wallet fragment.
WalletFragmentOptions.Builder | setTheme(int theme) Sets a theme for the Wallet selector on Android OS with `SDK_INT` >= `HONEYCOMB`.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Methods

#### public WalletFragmentOptions build ()

#### public WalletFragmentOptions.Builder setEnvironment (int environment)

Sets the Google Wallet environment to use. Specify `ENVIRONMENT_SANDBOX` until you have applied for and been granted access to the Production environment. Defaults to `ENVIRONMENT_SANDBOX`.

##### See Also

- `environment`
- `environment`

#### public WalletFragmentOptions.Builder setFragmentStyle (int styleResourceId)

Sets a set of attributes to customize the look and feel of the UI components of a `WalletFragment`. If not set explicitly the default style `WalletFragmentDefaultStyle` will be used. In most cases you will need to customize the style of the wallet fragment so that the UI of the fragment better matches the UI of the application.

##### Parameters

styleResourceId | id of a style resource that defines the attributes. See `WalletFragmentStyle` for a list of attributes available

##### See Also

- `fragmentStyle`

#### public WalletFragmentOptions.Builder setFragmentStyle (WalletFragmentStyle fragmentStyle)

Sets a set of attributes to customize the look and feel of the UI components of a `WalletFragment`.

##### See Also

- `fragmentStyle`

#### public WalletFragmentOptions.Builder setMode (int mode)

Sets the mode of the wallet fragment. Supported modes are defined by `WalletFragmentMode`. Defaults to `BUY_BUTTON`.

##### See Also

- `fragmentMode`

#### public WalletFragmentOptions.Builder setTheme (int theme)

Sets a theme for the Wallet selector on Android OS with `SDK_INT` >= `HONEYCOMB`. The only legitimate values are `THEME_HOLO_DARK` and `THEME_HOLO_LIGHT` as those are the only supported themes. User-created themes are not supported. Value ignored for Android OS with `SDK_INT` < `HONEYCOMB`. Defaults to `THEME_HOLO_DARK`.

##### See Also

- `theme`
- `theme`