public class

TextInfo

extends Object
implements JsonSerializable
java.lang.Object
   ↳ com.urbanairship.iam.TextInfo

Class Overview

Text display info.

Summary

Nested Classes
@interface TextInfo.Alignment  
class TextInfo.Builder Text info builder. 
@interface TextInfo.Style  
Constants
String ALIGNMENT_CENTER Center text alignment.
String ALIGNMENT_LEFT Left text alignment.
String ALIGNMENT_RIGHT Right text alignment.
String STYLE_BOLD Bold text style.
String STYLE_ITALIC Italic text style.
String STYLE_UNDERLINE Underline text style.
Public Methods
boolean equals(Object o)
static TextInfo fromJson(JsonValue value)
Parses a TextInfo from a JsonValue.
String getAlignment()
Returns the text alignment.
Integer getColor()
Returns the font color.
int getDrawable(Context context)
Returns the button icon.
List<String> getFontFamilies()
List of font families.
Float getFontSize()
Returns the font size.
List<String> getStyles()
Returns a list of text styles.
String getText()
Returns the text.
int hashCode()
static TextInfo.Builder newBuilder()
Builder factory method.
static TextInfo.Builder newBuilder(TextInfo textInfo)
Creates a builder from existing text info.
JsonValue toJsonValue()
Returns the objects represented as a JsonValue.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.urbanairship.json.JsonSerializable

Constants

public static final String ALIGNMENT_CENTER

Center text alignment.

Constant Value: "center"

public static final String ALIGNMENT_LEFT

Left text alignment.

Constant Value: "left"

public static final String ALIGNMENT_RIGHT

Right text alignment.

Constant Value: "right"

public static final String STYLE_BOLD

Bold text style.

Constant Value: "bold"

public static final String STYLE_ITALIC

Italic text style.

Constant Value: "italic"

public static final String STYLE_UNDERLINE

Underline text style.

Constant Value: "underline"

Public Methods

public boolean equals (Object o)

public static TextInfo fromJson (JsonValue value)

Parses a TextInfo from a JsonValue.

Parameters
value The json value.
Returns
  • The parsed text info.
Throws
JsonException If the text info was unable to be parsed.

public String getAlignment ()

Returns the text alignment.

Returns
  • The text alignment.

public Integer getColor ()

Returns the font color.

Returns
  • The font color.

public int getDrawable (Context context)

Returns the button icon.

Parameters
context The application context
Returns
  • The icon resource ID.

public List<String> getFontFamilies ()

List of font families.

Returns
  • The list of font families.

public Float getFontSize ()

Returns the font size.

Returns
  • The font size.

public List<String> getStyles ()

Returns a list of text styles.

Returns
  • The list of text styles.

public String getText ()

Returns the text.

Returns
  • The text.

public int hashCode ()

public static TextInfo.Builder newBuilder ()

Builder factory method.

Returns
  • A builder instance.

public static TextInfo.Builder newBuilder (TextInfo textInfo)

Creates a builder from existing text info.

Parameters
textInfo The text info.
Returns
  • A builder instance.

public JsonValue toJsonValue ()

Returns the objects represented as a JsonValue.

Returns
  • The object as a JsonValue.

public String toString ()