public class

TimelineMarkerCellView

extends TimelineCellView
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ com.sap.cloud.mobile.fiori.timelineview.views.TimelineCellView
         ↳ com.sap.cloud.mobile.fiori.timelineview.views.TimelineMarkerCellView
Known Direct Subclasses

Class Overview

An concrete class demonstrating a chronological event.

Structure

  • Chronology Bar
  • A Chronological bar representing the event. This bar can also be assigned a drawable as logo of the event.

  • Due Date
  • A date when the event is due or occurred See setDueDate(Date).

  • State
  • The state of the Timeline cell. A cell can be in one of the multiple possible states. See TimelineCellView.TimelineCellState for possible states a cell can be. See setState(TimelineCellState), and getState().

  • Headline
  • This text field is the headline of the event. This can be 3 lines long.

  • Event
  • This text field is the small detail appears on the left side of the chronology bar.

  • Event logo
  • This image field is the drawable detail of the event and appears on the left side of the chronology bar.

Summary

XML Attributes
Attribute Name Related Method Description
com.sap.cloud.mobile.fiori:event Event of the timeline cell

May be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character; 

com.sap.cloud.mobile.fiori:eventLogo Event logo of timeline cell

May be an integer value, such as "100". 

com.sap.cloud.mobile.fiori:headline Headline of the timeline cell

May be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character; 

com.sap.cloud.mobile.fiori:leftPaneWidthRatio Left width of timeline cell

May be a floating point value, such as "1.2". 

com.sap.cloud.mobile.fiori:node Node logo of timeline cell

May be an integer value, such as "100". 

com.sap.cloud.mobile.fiori:timelineEventTextAppearance Text appearance of event

May be an integer value, such as "100". 

com.sap.cloud.mobile.fiori:timelineHeadlineTextAppearance Text appearance of the cell

May be an integer value, such as "100". 

[Expand]
Inherited XML Attributes
From class com.sap.cloud.mobile.fiori.timelineview.views.TimelineCellView
[Expand]
Inherited Constants
From class com.sap.cloud.mobile.fiori.timelineview.views.TimelineCellView
From class android.view.ViewGroup
From class android.view.View
Fields
protected final int HEADLINE_LINES Number of lines in headlines
protected int mBarME End margin of Bar
protected int mBarMS Start margin of Bar
protected ImageView mEventLogo Image view of event logo
protected int mEventLogoMB Event logo bottom margin
protected int mEventLogoME Event logo end margin
protected int mEventLogoMS Event logo start margin
protected int mEventLogoMT Event logo top margin
protected int mEventLogoSize Event logo size
protected int mEventMB Event bottom margin
protected int mEventME Event end margin
protected int mEventMS Event start margin
protected int mEventMT Event top margin
protected CharSequence mEventText Event text of the cell
protected int mEventTextAppearance text appearance of event of the cell
protected int mEventTextColor Event text color
protected TextView mEventTextView TextView for event
protected int mHeadlineMB Headline bottom margin
protected int mHeadlineME Headline end margin
protected int mHeadlineMS Headline start margin
protected int mHeadlineMT Headline top margin
protected CharSequence mHeadlineText Headline text
protected int mHeadlineTextAppearance Headline text appearance
protected int mHeadlineTextColor Headline text color
protected TextView mHeadlineTextView Headline text view
[Expand]
Inherited Fields
From class com.sap.cloud.mobile.fiori.timelineview.views.TimelineCellView
From class android.view.View
Public Constructors
TimelineMarkerCellView(Context context)
TimelineMarkerCellView(Context context, AttributeSet attrs)
TimelineMarkerCellView(Context context, AttributeSet attrs, int defStyleAttr)
TimelineMarkerCellView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
TimelineCellView.TimelineCellType getCellType()
CharSequence getEvent()
Get the text of the event
Drawable getEventLogo()
Return the current logo drawable.
int getEventLogoSize()
Get the size of the event logo
int getEventMarginBottom()
int getEventMarginEnd()
int getEventMarginStart()
int getEventMarginTop()
CharSequence getHeadline()
Get the headline of the cell
int getHeadlineMarginBottom()
int getHeadlineMarginEnd()
int getHeadlineMarginStart()
int getHeadlineMarginTop()
void recycle()
Recycle the view for reuse
void setEvent(CharSequence event)
Set the event of this cell.
void setEvent(int resId)
Set the event of this cell.
void setEventLogo(int resId)
Set a event logo drawable from a resource id.
void setEventLogo(Drawable drawable)
Set a event logo drawable.
void setEventLogoDescription(CharSequence description)
Set a description of the event logo.
void setEventLogoDescription(int resId)
Set a description of the event logo.
void setEventLogoSize(int mEventLogoSize)
Set the size of the event logo size
void setEventMargin(int start, int top, int end, int bottom)
Sets the Headline margin.
void setEventMarginBottom(int margin)
Sets the bottom Headline margin in pixels.
void setEventMarginEnd(int margin)
Sets the ending Headline margin in pixels.
void setEventMarginStart(int margin)
Sets the starting Headline margin in pixels.
void setEventMarginTop(int margin)
Sets the top Headline margin in pixels.
void setEventTextAppearance(int resId)
Sets the text color, size, style, hint color, and highlight color from the specified TextAppearance resource.
void setEventTextAppearance(Context context, int resId)
Sets the text color, size, style, hint color, and highlight color from the specified TextAppearance resource.
void setEventTextColor(int color)
Sets the text color of the headline, if present.
void setHeadline(int resId)
Set the headline of this toolbar.
void setHeadline(CharSequence headline)
Set the headline of this toolbar.
void setHeadlineMargin(int start, int top, int end, int bottom)
Sets the Headline margin.
void setHeadlineMarginBottom(int margin)
Sets the bottom Headline margin in pixels.
void setHeadlineMarginEnd(int margin)
Sets the ending Headline margin in pixels.
void setHeadlineMarginStart(int margin)
Sets the starting Headline margin in pixels.
void setHeadlineMarginTop(int margin)
Sets the top Headline margin in pixels.
void setHeadlineTextAppearance(Context context, int resId)
Sets the text color, size, style, hint color, and highlight color from the specified TextAppearance resource.
void setHeadlineTextAppearance(int resId)
Sets the text color, size, style, hint color, and highlight color from the specified TextAppearance resource.
void setHeadlineTextColor(int color)
Sets the text color of the headline, if present.
Protected Methods
int getVCenteredLeftPaneTop(int maxHeight)
Get the top of the vertically centered left pane.
void initialize(AttributeSet attrs, int defStyle, int defStyleRes)
Handle the typed attributes of the cell
int[] measureSelf(int widthMeasureSpec, int heightMeasureSpec)
Measures this TimelineMarkerCellView in the given android.view.View.MeasureSpec
void onLayout(boolean changed, int l, int t, int r, int b)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
Measure the cell
[Expand]
Inherited Methods
From class com.sap.cloud.mobile.fiori.timelineview.views.TimelineCellView
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

XML Attributes

com.sap.cloud.mobile.fiori:event

Event of the timeline cell

May be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character;

Related Methods

com.sap.cloud.mobile.fiori:eventLogo

Event logo of timeline cell

May be an integer value, such as "100".

Related Methods

com.sap.cloud.mobile.fiori:headline

Headline of the timeline cell

May be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character;

Related Methods

com.sap.cloud.mobile.fiori:leftPaneWidthRatio

Left width of timeline cell

May be a floating point value, such as "1.2".

Related Methods

com.sap.cloud.mobile.fiori:node

Node logo of timeline cell

May be an integer value, such as "100".

Related Methods

com.sap.cloud.mobile.fiori:timelineEventTextAppearance

Text appearance of event

May be an integer value, such as "100".

Related Methods

com.sap.cloud.mobile.fiori:timelineHeadlineTextAppearance

Text appearance of the cell

May be an integer value, such as "100".

Related Methods

Fields

protected final int HEADLINE_LINES

Number of lines in headlines

Constant Value: 3 (0x00000003)

protected int mBarME

End margin of Bar

protected int mBarMS

Start margin of Bar

protected ImageView mEventLogo

Image view of event logo

protected int mEventLogoMB

Event logo bottom margin

protected int mEventLogoME

Event logo end margin

protected int mEventLogoMS

Event logo start margin

protected int mEventLogoMT

Event logo top margin

protected int mEventLogoSize

Event logo size

protected int mEventMB

Event bottom margin

protected int mEventME

Event end margin

protected int mEventMS

Event start margin

protected int mEventMT

Event top margin

protected CharSequence mEventText

Event text of the cell

protected int mEventTextAppearance

text appearance of event of the cell

protected int mEventTextColor

Event text color

protected TextView mEventTextView

TextView for event

protected int mHeadlineMB

Headline bottom margin

protected int mHeadlineME

Headline end margin

protected int mHeadlineMS

Headline start margin

protected int mHeadlineMT

Headline top margin

protected CharSequence mHeadlineText

Headline text

protected int mHeadlineTextAppearance

Headline text appearance

protected int mHeadlineTextColor

Headline text color

protected TextView mHeadlineTextView

Headline text view

Public Constructors

public TimelineMarkerCellView (Context context)

public TimelineMarkerCellView (Context context, AttributeSet attrs)

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

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

Public Methods

public CharSequence getEvent ()

Get the text of the event

Returns
  • CharSequence

public Drawable getEventLogo ()

Return the current logo drawable.

Returns
  • The current logo drawable

public int getEventLogoSize ()

Get the size of the event logo

Returns
  • int

public int getEventMarginBottom ()

Returns
  • the bottom Headline margin in pixels

public int getEventMarginEnd ()

Returns
  • the ending Headline margin in pixels

public int getEventMarginStart ()

Returns
  • the starting Headline margin in pixels

public int getEventMarginTop ()

Returns
  • the top Headline margin in pixels

public CharSequence getHeadline ()

Get the headline of the cell

Returns
  • CharSequence
See Also

public int getHeadlineMarginBottom ()

Returns
  • the bottom Headline margin in pixels

public int getHeadlineMarginEnd ()

Returns
  • the ending Headline margin in pixels

public int getHeadlineMarginStart ()

Returns
  • the starting Headline margin in pixels

public int getHeadlineMarginTop ()

Returns
  • the top Headline margin in pixels

public void recycle ()

Recycle the view for reuse

public void setEvent (CharSequence event)

Set the event of this cell.

A event should be used as the anchor for a section of content. It should describe or name the content being viewed.

Parameters
event Headline to set
See Also

public void setEvent (int resId)

Set the event of this cell.

Parameters
resId Resource ID of a string to set as the headline
See Also

public void setEventLogo (int resId)

Set a event logo drawable from a resource id.

This drawable should generally take the place of title text. The logo cannot be clicked. Apps using a logo should also supply a description using setEventLogoDescription(int).

Parameters
resId ID of a drawable resource
See Also

public void setEventLogo (Drawable drawable)

Set a event logo drawable. setEventLogoDescription(int).

Parameters
drawable Drawable to use as a logo

public void setEventLogoDescription (CharSequence description)

Set a description of the event logo.

This description will be used for accessibility or other similar descriptions of the UI.

Parameters
description Description to set

public void setEventLogoDescription (int resId)

Set a description of the event logo.

This description will be used for accessibility or other similar descriptions of the UI.

Parameters
resId String resource id

public void setEventLogoSize (int mEventLogoSize)

Set the size of the event logo size

Parameters
mEventLogoSize int

public void setEventMargin (int start, int top, int end, int bottom)

Sets the Headline margin.

Parameters
start the starting Headline margin in pixels
top the top Headline margin in pixels
end the ending Headline margin in pixels
bottom the bottom Headline margin in pixels

public void setEventMarginBottom (int margin)

Sets the bottom Headline margin in pixels.

Parameters
margin int

public void setEventMarginEnd (int margin)

Sets the ending Headline margin in pixels.

Parameters
margin the ending Headline margin in pixels

public void setEventMarginStart (int margin)

Sets the starting Headline margin in pixels.

Parameters
margin the starting Headline margin in pixels

public void setEventMarginTop (int margin)

Sets the top Headline margin in pixels.

Parameters
margin the top Headline margin in pixels

public void setEventTextAppearance (int resId)

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

Parameters
resId int

public void setEventTextAppearance (Context context, int resId)

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

Parameters
context Context
resId int

public void setEventTextColor (int color)

Sets the text color of the headline, if present.

Parameters
color The new text color in 0xAARRGGBB format

public void setHeadline (int resId)

Set the headline of this toolbar.

Parameters
resId Resource ID of a string to set as the headline

public void setHeadline (CharSequence headline)

Set the headline of this toolbar.

A headline should be used as the anchor for a section of content. It should describe or name the content being viewed.

Parameters
headline Headline to set

public void setHeadlineMargin (int start, int top, int end, int bottom)

Sets the Headline margin.

Parameters
start the starting Headline margin in pixels
top the top Headline margin in pixels
end the ending Headline margin in pixels
bottom the bottom Headline margin in pixels

public void setHeadlineMarginBottom (int margin)

Sets the bottom Headline margin in pixels.

Parameters
margin the bottom Headline margin in pixels

public void setHeadlineMarginEnd (int margin)

Sets the ending Headline margin in pixels.

Parameters
margin the ending Headline margin in pixels

public void setHeadlineMarginStart (int margin)

Sets the starting Headline margin in pixels.

Parameters
margin the starting Headline margin in pixels

public void setHeadlineMarginTop (int margin)

Sets the top Headline margin in pixels.

Parameters
margin the top Headline margin in pixels

public void setHeadlineTextAppearance (Context context, int resId)

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

Parameters
context Context
resId int
See Also

public void setHeadlineTextAppearance (int resId)

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

Parameters
resId int

public void setHeadlineTextColor (int color)

Sets the text color of the headline, if present.

Parameters
color The new text color in 0xAARRGGBB format

Protected Methods

protected int getVCenteredLeftPaneTop (int maxHeight)

Get the top of the vertically centered left pane. Counts the heights of event text and event logo.

Returns
  • integer

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

Handle the typed attributes of the cell

Parameters
attrs AttributeSet
defStyle Integer
defStyleRes Integer

protected int[] measureSelf (int widthMeasureSpec, int heightMeasureSpec)

Measures this TimelineMarkerCellView in the given android.view.View.MeasureSpec

Parameters
widthMeasureSpec android.view.View.MeasureSpec
heightMeasureSpec android.view.View.MeasureSpec
Returns
  • int[]

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

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)

Measure the cell

Parameters
widthMeasureSpec int
heightMeasureSpec int