public class

MomentsLayout

extends Object
java.lang.Object
   ↳ com.sap.cloud.mobile.fiori.moments.MomentsLayout

Summary

Constants
int MAIN_TEXT_SP_VALUE
int SUB_TEXT_SP_VALUE
Public Constructors
MomentsLayout(Context ctxt, Paint drawPaint)
Creates a MomentsLayout for a context with a paint
Public Methods
void drawData(Canvas canvas)
This function draws the no data layout on the given canvas
void setDimensions(float width, float height)
Sets the layout width and height for the layout
void setHeadline(CharSequence text)
Set the Main text for the no data
void setHeadlineTextAppearance(int resId)
Sets the text color, size, style, hint color, and highlight color for headline from the specified TextAppearance resource.
void setImage(int id)
Using an resource ID this function loads the image to be used in the MomentLayout
void setSubheadline(CharSequence text)
Set the Sub text for the no data
void setSubheadlineTextAppearance(int resId)
Sets the text color, size, style, hint color, and highlight color for subheadline from the specified TextAppearance resource.
void setTypeFace(Typeface tf)
Set the typeface for the text
Protected Methods
TextPaint createTextPaint(TextPaint textPaint, int resId)
Creates TextPaint from the given resource id
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int MAIN_TEXT_SP_VALUE

Constant Value: 16 (0x00000010)

public static final int SUB_TEXT_SP_VALUE

Constant Value: 14 (0x0000000e)

Public Constructors

public MomentsLayout (Context ctxt, Paint drawPaint)

Creates a MomentsLayout for a context with a paint

Parameters
ctxt activity context
drawPaint paint to draw the screen.

Public Methods

public void drawData (Canvas canvas)

This function draws the no data layout on the given canvas

Parameters
canvas instances of a canvas to be used

public void setDimensions (float width, float height)

Sets the layout width and height for the layout

Parameters
width width to be used
height height value to be used

public void setHeadline (CharSequence text)

Set the Main text for the no data

Parameters
text value of Headline text for the Moment screen

public void setHeadlineTextAppearance (int resId)

Sets the text color, size, style, hint color, and highlight color for headline from the specified TextAppearance resource.

public void setImage (int id)

Using an resource ID this function loads the image to be used in the MomentLayout

Parameters
id resource id

public void setSubheadline (CharSequence text)

Set the Sub text for the no data

Parameters
text value of subHeadline text for the Moment screen

public void setSubheadlineTextAppearance (int resId)

Sets the text color, size, style, hint color, and highlight color for subheadline from the specified TextAppearance resource.

public void setTypeFace (Typeface tf)

Set the typeface for the text

Parameters
tf typeface

Protected Methods

protected TextPaint createTextPaint (TextPaint textPaint, int resId)

Creates TextPaint from the given resource id