CornerPlaceAction

public abstract class CornerPlaceAction


A place action that defines a button on the place details widget corner.

Summary

Nested types

public abstract class CornerPlaceAction.Builder

Builder for CornerPlaceAction.

Callback for when the action button is clicked.

Which style tokens to use for the button background.

Constants

static final CornerPlaceAction

An action button that initiates a phone call to the place.

static final CornerPlaceAction

An action button that opens directions to the place in a map application.

static final CornerPlaceAction

An action button that opens the place in a map application.

static final CornerPlaceAction

An action button that opens the website of the place.

Public constructors

Public methods

static CornerPlaceAction.Builder
builder(
    @DrawableRes int iconResId,
    CornerPlaceAction.OnClickListener onClickListener
)

Builder for CornerPlaceAction.

abstract CornerPlaceAction.Style

The style of the button.

abstract @StringRes int

The content description of the button to be read by screen readers.

abstract @DrawableRes int

The icon to be displayed on the button.

abstract CornerPlaceAction.OnClickListener

The callback to be invoked when the button is clicked.

abstract CornerPlaceAction.Builder

Returns a builder initialized with the current values of this CornerPlaceAction.

Constants

CALL

public static final CornerPlaceAction CALL

An action button that initiates a phone call to the place.

This action comes with a pre-configured default click behavior.

OPEN_DIRECTIONS

public static final CornerPlaceAction OPEN_DIRECTIONS

An action button that opens directions to the place in a map application.

This action comes with a pre-configured default click behavior.

OPEN_IN_MAPS

public static final CornerPlaceAction OPEN_IN_MAPS

An action button that opens the place in a map application.

This action comes with a pre-configured default click behavior.

OPEN_WEBSITE

public static final CornerPlaceAction OPEN_WEBSITE

An action button that opens the website of the place.

This action comes with a pre-configured default click behavior.

Public constructors

CornerPlaceAction

public CornerPlaceAction()

Public methods

builder

public static CornerPlaceAction.Builder builder(
    @DrawableRes int iconResId,
    CornerPlaceAction.OnClickListener onClickListener
)

Builder for CornerPlaceAction.

Parameters
@DrawableRes int iconResId

The icon to be displayed on the button.

CornerPlaceAction.OnClickListener onClickListener

The callback to be invoked when the button is clicked.

getButtonStyle

public abstract CornerPlaceAction.Style getButtonStyle()

The style of the button. The default is SECONDARY.

getContentDescriptionResId

public abstract @StringRes int getContentDescriptionResId()

The content description of the button to be read by screen readers. The default is 0, which is no content description.

getIconResId

public abstract @DrawableRes int getIconResId()

The icon to be displayed on the button.

getOnClickListener

public abstract CornerPlaceAction.OnClickListener getOnClickListener()

The callback to be invoked when the button is clicked.

toBuilder

public abstract CornerPlaceAction.Builder toBuilder()

Returns a builder initialized with the current values of this CornerPlaceAction.