public class

Banner

extends AbstractEntityCell
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ com.sap.cloud.mobile.fiori.object.AbstractEntityCell
         ↳ com.sap.cloud.mobile.fiori.banner.Banner

Summary

[Expand]
Inherited XML Attributes
From class com.sap.cloud.mobile.fiori.object.AbstractEntityCell
Constants
int DISMISS_DURATION
float ONE_LINE_MULT
int SHOW_DURATION
float THREE_LINE_MULT
float TWO_LINE_MULT
[Expand]
Inherited Constants
From class com.sap.cloud.mobile.fiori.object.AbstractEntityCell
From class android.view.ViewGroup
From class android.view.View
Fields
protected boolean mIsAnimating
protected boolean mIsDismissing
protected boolean mIsShown
protected boolean mOneButton
[Expand]
Inherited Fields
From class com.sap.cloud.mobile.fiori.object.AbstractEntityCell
From class android.view.View
Public Constructors
Banner(Context context)
Banner(Context context, AttributeSet attrs)
Banner(Context context, AttributeSet attrs, int defStyleAttr)
Banner(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
void dismiss(int duration, int delay)
Performs the animation for hiding the banner from a visible state.
void dismiss()
boolean getIsShown()
int getMessageLines()
Gets the number of lines the message will take up.
void setButtonBackground(int resId)
void setButtonTextAppearance(int resId)
void setConfirmButtonText(CharSequence text)
Sets the text on the confirm button.
void setConfirmClickListener(View.OnClickListener listener)
Sets a click listener on the confirm button.
void setDismissButtonText(CharSequence text)
Sets the text on the dismiss button.
void setDismissClickListener(View.OnClickListener listener)
Sets a click listener on the dismiss button.
void setIsShown(boolean isShown)
void setMessage(CharSequence message)
void setMessage(int resId)
void setMessageTextAppearance(int resId)
void setSeparatorColor(int color)
Sets the color of the separator line.
void setSeparatorEnabled(boolean enabled)
Adds or removes the separator line.
void show(int duration, int delay)
Performs the animation for displaying the banner from a hidden state.
void show()
Protected Methods
int getMaxLines()
Returns the max number of lines supported by this cell.
void init()
void initializeStyledAttributes(AttributeSet attrs, int defStyle, int defStyleRes)
void onLayout(boolean changed, int l, int t, int r, int b)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
[Expand]
Inherited Methods
From class com.sap.cloud.mobile.fiori.object.AbstractEntityCell
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface com.sap.cloud.mobile.fiori.object.KeylineProvider

Constants

public static final int DISMISS_DURATION

Constant Value: 250 (0x000000fa)

public static final float ONE_LINE_MULT

Constant Value: 0.5

public static final int SHOW_DURATION

Constant Value: 300 (0x0000012c)

public static final float THREE_LINE_MULT

Constant Value: 2.5

public static final float TWO_LINE_MULT

Constant Value: 1.5

Fields

protected boolean mIsAnimating

protected boolean mIsDismissing

protected boolean mIsShown

protected boolean mOneButton

Public Constructors

public Banner (Context context)

public Banner (Context context, AttributeSet attrs)

public Banner (Context context, AttributeSet attrs, int defStyleAttr)

public Banner (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public Methods

public void dismiss (int duration, int delay)

Performs the animation for hiding the banner from a visible state.

Parameters
duration the length of the animation
delay the amount of time between the method call and the beginning of the animation

public void dismiss ()

public boolean getIsShown ()

public int getMessageLines ()

Gets the number of lines the message will take up.

public void setButtonBackground (int resId)

public void setButtonTextAppearance (int resId)

public void setConfirmButtonText (CharSequence text)

Sets the text on the confirm button. Adds or removes the button.

Parameters
text text for the confirm button. Null value removes the button.

public void setConfirmClickListener (View.OnClickListener listener)

Sets a click listener on the confirm button.

Parameters
listener click listener for the confirm button.

public void setDismissButtonText (CharSequence text)

Sets the text on the dismiss button. Adds or removes the button.

Parameters
text text for the dismiss button. Null value removes the button.

public void setDismissClickListener (View.OnClickListener listener)

Sets a click listener on the dismiss button.

Parameters
listener click listener for the dismiss button.

public void setIsShown (boolean isShown)

public void setMessage (CharSequence message)

public void setMessage (int resId)

public void setMessageTextAppearance (int resId)

public void setSeparatorColor (int color)

Sets the color of the separator line.

Parameters
color color of the separator line.

public void setSeparatorEnabled (boolean enabled)

Adds or removes the separator line.

Parameters
enabled whether the line is visible or not.

public void show (int duration, int delay)

Performs the animation for displaying the banner from a hidden state.

Parameters
duration the length of the animation
delay the amount of time between the method call and the beginning of the animation

public void show ()

Protected Methods

protected int getMaxLines ()

Returns the max number of lines supported by this cell.

protected void init ()

protected void initializeStyledAttributes (AttributeSet attrs, int defStyle, int defStyleRes)

protected void onLayout (boolean changed, int l, int t, int r, int b)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)