java.lang.Object | |
↳ | com.google.android.gms.wallet.fragment.WalletFragmentStyle |
Defines attributes to customize the look and feel of WalletFragment
, to be used in setFragmentStyle(WalletFragmentStyle)
. You may also specify these
attributes using custom XML tags in a style resource and either add wallet:fragmentStyle="@style/MyWalletFragmentCustomStyle"
to your <fragment>
tag or pass the id of the style resource in setFragmentStyle(int)
.
See WalletFragmentDefaultStyle
for an example of the
wallet fragment style.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WalletFragmentStyle.BuyButtonAppearance | Options for buy button appearance. | ||||||||||
WalletFragmentStyle.BuyButtonText | Options for text displayed on the buy button. | ||||||||||
WalletFragmentStyle.Dimension | Constants for specifying dimensions in WalletFragmentStyle . |
||||||||||
WalletFragmentStyle.LogoImageType | Logo image types. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sets the appearance of the buy button.
| |||||||||||
Specifies a height for the buy button.
| |||||||||||
Specifies a height for the buy button.
| |||||||||||
Sets text for the buy button.
| |||||||||||
Specifies a width for the buy button.
| |||||||||||
Specifies a width for the buy button.
| |||||||||||
Sets the color for the masked wallet details view background.
| |||||||||||
Sets the drawable resource id for the masked wallet details view background.
| |||||||||||
Sets the color for the masked wallet details "Change" button background.
| |||||||||||
Sets the drawable resource id for the masked wallet details "Change" button background.
| |||||||||||
Sets the text appearance for the masked wallet details "Change" button text.
| |||||||||||
Sets text appearance for the headers describing masked wallet details.
| |||||||||||
Sets the type of the wallet image logo in masked wallet details view.
| |||||||||||
This method is deprecated.
Support for customizing this color will be removed in the future. Please, stop
using this API.
| |||||||||||
Sets text appearance for the masked wallet details.
| |||||||||||
Sets resource id of the style which will be used to customize wallet fragment UI.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Sets the appearance of the buy button. See WalletFragmentStyle.BuyButtonAppearance
for the list of possible
values. Defaults to ANDROID_PAY_DARK
. This will override the buy
button appearance defined in any style passed in setStyleResourceId(int)
.
Parameters | |
---|---|
buyButtonAppearance |
int :
appearance of the buy button |
Returns | |
---|---|
WalletFragmentStyle |
See also:
Specifies a height for the buy button. The height includes a padding of 8dp (4dp on each side).
The padding is used for a border around the button in pressed and focused states. The range of
height supported is 40dp~72dp. This will override the buy button height defined in any style
passed in setStyleResourceId(int)
.
Parameters | |
---|---|
unit |
int :
unit of the height value. See constants starting with UNIT_ in WalletFragmentStyle.Dimension
for a list of supported units |
height |
float :
value of the height
|
Returns | |
---|---|
WalletFragmentStyle |
Specifies a height for the buy button. The height includes a padding of 8dp (4dp on each side).
The padding is used for a border around the button in pressed and focused states. The range of
height supported is 40dp~72dp. This will override the buy button height defined in any style
passed in setStyleResourceId(int)
.
Parameters | |
---|---|
height |
int :
height in pixels, or MATCH_PARENT , WRAP_CONTENT
|
Returns | |
---|---|
WalletFragmentStyle |
Sets text for the buy button. This will override the buy button text defined in any style
passed in setStyleResourceId(int)
. See WalletFragmentStyle.BuyButtonText
for the list of possible
values. Defaults to BUY_WITH
.
Parameters | |
---|---|
buyButtonText |
int :
text on the buy button |
Returns | |
---|---|
WalletFragmentStyle |
See also:
Specifies a width for the buy button. The width includes a padding of 8dp (4dp on each side).
The padding is used for a border around the button in pressed and focused states. A minimum
width is enforced, and is computed from the height of the button and the width of the button
text. This will override the buy button width defined in any style passed in setStyleResourceId(int)
.
Parameters | |
---|---|
width |
int :
width in pixels, or MATCH_PARENT , WRAP_CONTENT
|
Returns | |
---|---|
WalletFragmentStyle |
Specifies a width for the buy button. The width includes a padding of 8dp (4dp on each side).
The padding is used for a border around the button in pressed and focused states. A minimum
width is enforced, and is computed from the height of the button and the width of the button
text. This will override the buy button width defined in any style passed in setStyleResourceId(int)
.
Parameters | |
---|---|
unit |
int :
unit of the width value. See constants starting with UNIT_ in WalletFragmentStyle.Dimension for
a list of supported units |
width |
float :
value of the width
|
Returns | |
---|---|
WalletFragmentStyle |
Sets the color for the masked wallet details view background. This will override the color
defined in any style passed in setStyleResourceId(int)
and background drawable which
was previously set.
Parameters | |
---|---|
color |
int :
the color as defined in android.graphics.Color
|
Returns | |
---|---|
WalletFragmentStyle |
Sets the drawable resource id for the masked wallet details view background. This will override
the drawable defined in any style passed in setStyleResourceId(int)
and background
color which was previously set.
Parameters | |
---|---|
resourceId |
int :
the id of the drawable resource.
|
Returns | |
---|---|
WalletFragmentStyle |
Sets the color for the masked wallet details "Change" button background. This will override the
background defined in any style passed in setStyleResourceId(int)
and drawable
resource id which was previously set for button background.
Parameters | |
---|---|
color |
int :
the color as defined in android.graphics.Color
|
Returns | |
---|---|
WalletFragmentStyle |
Sets the drawable resource id for the masked wallet details "Change" button background. This
will override the background defined in any style passed in setStyleResourceId(int)
and color previously set for the button background.
Parameters | |
---|---|
resourceId |
int :
the id of the drawable resource.
|
Returns | |
---|---|
WalletFragmentStyle |
Sets the text appearance for the masked wallet details "Change" button text. This will override
the text appearance defined in any style passed in setStyleResourceId(int)
.
Parameters | |
---|---|
resourceId |
int :
the id of a TextAppearance style
|
Returns | |
---|---|
WalletFragmentStyle |
Sets text appearance for the headers describing masked wallet details. This will override the
text appearance defined in any style passed in setStyleResourceId(int)
.
Parameters | |
---|---|
resourceId |
int :
the id of a TextAppearance style
|
Returns | |
---|---|
WalletFragmentStyle |
Sets the type of the wallet image logo in masked wallet details view. See WalletFragmentStyle.LogoImageType
for the list of possible values. Defaults to ANDROID_PAY
. This will
override the image type defined in any style passed in setStyleResourceId(int)
.
Parameters | |
---|---|
imageType |
int :
the type of the logo image. |
Returns | |
---|---|
WalletFragmentStyle |
See also:
This method is deprecated.
Support for customizing this color will be removed in the future. Please, stop
using this API.
Sets the color for the masked wallet details logo text. This will override the text color
defined in any style passed in setStyleResourceId(int)
.
Note: Not all WalletFragmentStyle.LogoImageType
s support this customization, so this value may be
ignored depending on the logo type set using setMaskedWalletDetailsLogoImageType(int)
.
Parameters | |
---|---|
color |
int :
the color as defined in android.graphics.Color |
Returns | |
---|---|
WalletFragmentStyle |
Sets text appearance for the masked wallet details. This will override the text appearance
defined in any style passed in setStyleResourceId(int)
.
Parameters | |
---|---|
resourceId |
int :
the id of a TextAppearance style
|
Returns | |
---|---|
WalletFragmentStyle |
Sets resource id of the style which will be used to customize wallet fragment UI. 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 | |
---|---|
id |
int :
id of a style defined in xml
|
Returns | |
---|---|
WalletFragmentStyle |
Parameters | |
---|---|
dest |
Parcel
|
flags |
int
|