BrowserInterface | Button SDK for Android v7.0.0

Package Index

Interfaces

Classes

Enums

BrowserInterface

Interface containing methods that a publisher can use to customize the embedded browser experience.

Class Overview

Nested Classes
Interface BrowserInterface.Footer
Interface BrowserInterface.Header

Constants

Constants
int INVALID_COLOR

Public Methods

boolean canShowCards()

Indicates whether or not the top card can be animated.

Returns

CardList getCardList()

An object belonging to the browser interface that maintains the list of cards currently in the card system.

Returns

BrowserInterface.Footer getFooter()

Returns a reference to the browser footer.

Returns

BrowserInterface.Header getHeader()

Returns a reference to the browser header.

Returns

RelativeLayout getViewContainer()

A transparent view on top of the embedded browser content for displaying arbitrary views.

ViewGroup viewContainer = getViewContainer();
Context context = viewContainer.getContext();
LayoutInflater.from(context).inflate(R.layout.my_custom_view, viewContainer);

The custom view must be inflated with the view container's context to avoid any memory leaks.

Returns

void hideTopCard()

Hides the top card in the card list CardList. Call the method canShowCards() before attempting to call this method.

void navigateToUrl(String url)

Navigates the browser to a new URL. Use this API to navigate the browser to a new URL of the same domain. A URL with a different domain should be opened by fetching and starting a new Purchase Path.

Parameters

void reloadCards()

Reloads all cards in the CardList and re-renders any visible cards.

Call this method after modifying cards in the CardList to update the view.

void setBrowserChromeClient(BrowserChromeClient client)

Set the BrowserChromeClient.

void showTopCard()

Shows the top card in the CardList over the browser content. Call the method canShowCards() before attempting to call this method.