Class ButtonAppearance.Builder

com.yandex.mobile.ads.nativeads.template.appearance

public class ButtonAppearance.Builder

A class for changing the design settings for buttons in native ads.

Methods

Builder()

Creates an object of the ButtonAppearance.Builder class.

ButtonAppearance build()

Creates an object of the ButtonAppearance class with the specified values.

ButtonAppearance.Builder setBorderColor(final int borderColor)

Sets the color of the button border.

ButtonAppearance.Builder setBorderWidth(final float borderWidth)

Sets the width of the button border.

ButtonAppearance.Builder setNormalColor(final int normalColor)

Sets the color of the button background in its normal state.

ButtonAppearance.Builder setPressedColor(final int pressedColor)

Sets the color of the button background when clicked.

ButtonAppearance.Builder setTextAppearance(final TextAppearance textAppearance)

Sets parameters for the button label.

Method Detail

Builder

public Builder ()

Creates an object of the ButtonAppearance.Builder class.

build

public ButtonAppearance build ()

Creates an object of the ButtonAppearance class with the specified values.

Returns:

An object of the ButtonAppearance class with the specified values.

setBorderColor

public ButtonAppearance.Builder setBorderColor (final int borderColor)

Sets the color of the button border.

Parameters:
borderColor

The color of the button border.

Returns:

Returns an object of the ButtonAppearance.Builder class with the specified button border color.

setBorderWidth

public ButtonAppearance.Builder setBorderWidth (final float borderWidth)

Sets the width of the button border.

Parameters:
borderWidth

Width of the button border.

Returns:

Returns an object of the ButtonAppearance.Builder class with the specified button border width.

setNormalColor

public ButtonAppearance.Builder setNormalColor (final int normalColor)

Sets the color of the button background in its normal state.

Parameters:
normalColor

The color of the button background in its normal state.

Returns:

Returns an object of the ButtonAppearance.Builder class with the specified background color of the button in the normal state.

setPressedColor

public ButtonAppearance.Builder setPressedColor (final int pressedColor)

Sets the color of the button background when clicked.

Parameters:
pressedColor

The color of the button background when clicked.

Returns:

Returns an object of the ButtonAppearance.Builder class with the specified background color of the button when pressed.

setTextAppearance

public ButtonAppearance.Builder setTextAppearance (final TextAppearance textAppearance)

Sets parameters for the button label.

Parameters:
textAppearance

Settings for the button label.

Returns:

Returns an object of the ButtonAppearance.Builder class with the specified button label settings.