public class

TimelineLineView

extends View
java.lang.Object
   ↳ android.view.View
     ↳ com.sap.cloud.mobile.fiori.timeline.views.TimelineLineView

Summary

Nested Classes
enum TimelineLineView.LineOrientation  
enum TimelineLineView.LineType  
[Expand]
Inherited Constants
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
TimelineLineView(Context context)
TimelineLineView(Context context, AttributeSet attrs)
TimelineLineView(Context context, AttributeSet attrs, int defStyleAttr)
TimelineLineView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
TimelineLineView.LineOrientation getLineOrientation()
Get the orientation of the line.
TimelineLineView.LineType getLineType()
float getNodeSize()
int getTimelineEndVisibility()
Drawable getTimelineNode()
int getTimelineNodeVisibility()
int getTimelineStartVisibility()
static TimelineLineView.LineType getTimelineViewType(int position, int totalSize, boolean isPreview)
Gets timeline view type.
void initLine(TimelineLineView.LineType lineType)
Initialize line
void setEndLine(Drawable endLine)
Sets a Drawable as the end line.
void setEndLine(int color)
Sets the end line using a color.
void setLineOrientation(TimelineLineView.LineOrientation lineOrientation)
Set the orientation of the line.
void setLinePadding(float padding)
Sets the padding between the node and the lines.
void setLineSize(float lineSize)
Sets the thickness of the line.
void setNodeSize(float nodeSize)
Set the timeline node size.
void setStartLine(int color)
Sets the start line using a color.
void setStartLine(Drawable startLine)
Sets a Drawable as the start line.
void setState(TimelineCellView.TimelineCellState state)
void setTimelineNode(Drawable node)
Set the timeline node.
void setTimelineNode(Drawable node, int color)
Set the timeline node.
void setTimelineNodeColor(int color)
void setWidth(float width)
Protected Methods
void onDraw(Canvas canvas)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
void onSizeChanged(int w, int h, int oldw, int oldh)
[Expand]
Inherited Methods
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.accessibility.AccessibilityEventSource

Public Constructors

public TimelineLineView (Context context)

public TimelineLineView (Context context, AttributeSet attrs)

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

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

Public Methods

public TimelineLineView.LineOrientation getLineOrientation ()

Get the orientation of the line.

Returns
  • int

public TimelineLineView.LineType getLineType ()

public float getNodeSize ()

public int getTimelineEndVisibility ()

public Drawable getTimelineNode ()

public int getTimelineNodeVisibility ()

public int getTimelineStartVisibility ()

public static TimelineLineView.LineType getTimelineViewType (int position, int totalSize, boolean isPreview)

Gets timeline view type.

Parameters
position the position
totalSize the total size
isPreview whether the cell is a preview cell or not
Returns
  • the timeline view type

public void initLine (TimelineLineView.LineType lineType)

Initialize line

Parameters
lineType the view type

public void setEndLine (Drawable endLine)

Sets a Drawable as the end line.

Parameters
endLine Drawable

public void setEndLine (int color)

Sets the end line using a color.

Parameters
color the color of the line

public void setLineOrientation (TimelineLineView.LineOrientation lineOrientation)

Set the orientation of the line.

Parameters
lineOrientation int

public void setLinePadding (float padding)

Sets the padding between the node and the lines.

Parameters
padding the padding between the node and the lines

public void setLineSize (float lineSize)

Sets the thickness of the line.

Parameters
lineSize the line thickness

public void setNodeSize (float nodeSize)

Set the timeline node size.

Parameters
nodeSize the size of the node

public void setStartLine (int color)

Sets the start line using a color.

Parameters
color the color of the line

public void setStartLine (Drawable startLine)

Sets a Drawable as the start line.

Parameters
startLine Drawable

public void setState (TimelineCellView.TimelineCellState state)

public void setTimelineNode (Drawable node)

Set the timeline node.

Parameters
node the Drawable used for the node

public void setTimelineNode (Drawable node, int color)

Set the timeline node.

Parameters
node the Drawable used for the node
color the color of the Drawable

public void setTimelineNodeColor (int color)

public void setWidth (float width)

Protected Methods

protected void onDraw (Canvas canvas)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)

protected void onSizeChanged (int w, int h, int oldw, int oldh)