public interface

CheckoutInterface

com.usebutton.sdk.checkout.CheckoutInterface

Class Overview

Interface containing methods that a publisher can use to customize the in-app checkout experience.

Summary

Public Methods
abstract CardList getCardList()
Gets the list of cards used in the checkout card view container
abstract RelativeLayout getViewContainer()
Gets a view container that can be used to add a custom view to the checkout experience.
abstract void hideTopCard()
Animates the top card in the card list out of the checkout view CardList
abstract void reloadCards()
Reloads all cards from scratch and re-renders any visible cards.
abstract void setBottomBarColor(int color)
Sets the primary color of the bottom bar in the checkout experience.
abstract void setBottomBarTintColor(int color)
Sets the tint color of the bottom bar in the checkout experience.
abstract void setSubTitle(String subTitle)
Sets the subtitle of the checkout experience.
abstract void setSubTitleColor(int color)
Sets the color of the subtitle in the checkout experience.
abstract void setTitle(String title)
Sets the main title of the checkout experience.
abstract void setTitleColor(int color)
Sets the color of the main title of in the checkout experience.
abstract void setTopBarColor(int color)
Sets the primary color of the top bar in the checkout experience.
abstract void setTopBarTintColor(int color)
Sets the tint color of the top bar in the checkout experience.
abstract void showTopCard()
Animates the top card in the card list out of the checkout view CardList

Public Methods

public abstract CardList getCardList ()

Gets the list of cards used in the checkout card view container

Returns

public abstract RelativeLayout getViewContainer ()

Gets a view container that can be used to add a custom view to the checkout experience.

 Context context = getViewContainer.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 checkout view container overlay.

public abstract void hideTopCard ()

Animates the top card in the card list out of the checkout view CardList

public abstract void reloadCards ()

Reloads all cards from scratch and re-renders any visible cards. Call this method when you make changes to cards in the CardList.

public abstract void setBottomBarColor (int color)

Sets the primary color of the bottom bar in the checkout experience.

Parameters
color hex value of the bottom bar background color.

public abstract void setBottomBarTintColor (int color)

Sets the tint color of the bottom bar in the checkout experience. The tint color is applied to non-text UI elements (ex. navigation buttons).

Parameters
color hex value of the bottom bar tint color.

public abstract void setSubTitle (String subTitle)

Sets the subtitle of the checkout experience.

Parameters
subTitle the subtitle text.

public abstract void setSubTitleColor (int color)

Sets the color of the subtitle in the checkout experience.

Parameters
color hex value of the subtitle text color.

public abstract void setTitle (String title)

Sets the main title of the checkout experience.

Parameters
title the title text.

public abstract void setTitleColor (int color)

Sets the color of the main title of in the checkout experience.

Parameters
color hex value of the title text color.

public abstract void setTopBarColor (int color)

Sets the primary color of the top bar in the checkout experience.

Parameters
color hex value of the tob bar background color.

public abstract void setTopBarTintColor (int color)

Sets the tint color of the top bar in the checkout experience. The tint color is applied to non-text UI elements (ex. cancel button).

Parameters
color hex value of the tob bar tint color.

public abstract void showTopCard ()

Animates the top card in the card list out of the checkout view CardList