public static class

TextCard.Builder

extends Object
java.lang.Object
   ↳ com.usebutton.sdk.purchasepath.TextCard.Builder

Summary

Public Constructors
Builder(CallToAction callToAction, String title, String body)
Constructor
Public Methods
TextCard build()
Builds the text card.
TextCard.Builder setBackgroundColor(int backgroundColor)
The background color of the card view.
TextCard.Builder setBodyColor(int bodyColor)
The color with which the body will be displayed.
TextCard.Builder setBodySize(float bodySize)
The title size in sp.
TextCard.Builder setBodyTypeface(Typeface bodyTypeface)
The font with which the body will be displayed.
TextCard.Builder setTitleColor(int titleColor)
The color with which the title will be displayed.
TextCard.Builder setTitleSize(float titleSize)
The title size in sp.
TextCard.Builder setTitleTypeface(Typeface titleTypeface)
The font with which the title will be displayed.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder (CallToAction callToAction, String title, String body)

Constructor

Parameters
callToAction Call to action that will be displayed when the card is "active".
title The title of the card to be displayed in the card's view.
body The body of the card to be displayed in the card's view.

Public Methods

public TextCard build ()

Builds the text card.

public TextCard.Builder setBackgroundColor (int backgroundColor)

The background color of the card view. Defaults to #0CAC56 (Green).

public TextCard.Builder setBodyColor (int bodyColor)

The color with which the body will be displayed. Defaults to Color#WHITE.

public TextCard.Builder setBodySize (float bodySize)

The title size in sp. Default to DEFAULT_TEXT_SIZE_BODY.

public TextCard.Builder setBodyTypeface (Typeface bodyTypeface)

The font with which the body will be displayed. Defaults to Typeface#DEFAULT.

public TextCard.Builder setTitleColor (int titleColor)

The color with which the title will be displayed. Defaults to Color#WHITE.

public TextCard.Builder setTitleSize (float titleSize)

The title size in sp. Default to DEFAULT_TEXT_SIZE_TITLE.

public TextCard.Builder setTitleTypeface (Typeface titleTypeface)

The font with which the title will be displayed. Defaults to Typeface#DEFAULT.