BrowserInterface | Button SDK for Android v7.0.0
Package Index
- com.usebutton.sdk
- com.usebutton.sdk.action
- com.usebutton.sdk.autofill
- com.usebutton.sdk.boost
- com.usebutton.sdk.browser
- com.usebutton.sdk.configuration
- com.usebutton.sdk.context
- com.usebutton.sdk.debug
- com.usebutton.sdk.exception
- com.usebutton.sdk.impression
- com.usebutton.sdk.models
- com.usebutton.sdk.personalization
- com.usebutton.sdk.purchasepath
- com.usebutton.sdk.user
Interfaces
- BrowserInterface
- BrowserInterface.Footer
- BrowserInterface.Header
- BrowserPage
- BrowserPage.DomResultListener
- CardList
- CheckoutPage
- ProductPage
- PurchasePage
- PurchasePath.Listener
- PurchasePathExtension
- PurchasePathInterface
- PurchasePathListener
Classes
- BrowserChromeClient
- CallToAction
- Card
- Commission
- Product
- PurchasePath
- PurchasePathRequest
- TextCard
- TextCard.Builder
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
- true if cards can be animated, false otherwise.
CardList getCardList()
An object belonging to the browser interface that maintains the list of cards currently in the card system.
Returns
CardListThe current list of cards in the system, ornullif the browser is not currently available.
BrowserInterface.Footer getFooter()
Returns a reference to the browser footer.
Returns
- The browser footer.
BrowserInterface.Header getHeader()
Returns a reference to the browser header.
Returns
- The browser header.
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
- The browser view container overlay.
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
- url: The URL to be loaded in the browser.
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.