public class

DataTableRow

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

Summary

XML Attributes
Attribute Name Related Method Description
com.sap.cloud.mobile.fiori:textLines setLines(int) Total number of lines. 
Constants
int ALIGN_END
int ALIGN_START
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
Fields
protected int m1lineHeight
protected int m1lineImageHeight
protected int m2linesHeight
protected int[] mAlignments
protected int mColumnDefaultWidth
protected int mColumnMaxWidth
protected int mColumnPaddingH
protected List<View> mColumns
protected int mDefaultHeaderLineHeight
protected int mDefaultHeaderTextSize
protected int mDefaultLineHeight
protected int mDefaultTextSize
protected int mEdgePaddingH
protected int mHeaderHeight
protected boolean mIsHeader
protected int mLines
protected int mMinHeight
protected int[] mPixelColumnWidths
protected float[] mRawColumnWidths
protected int mStickyMaxWidth
protected boolean mStickyMode
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
DataTableRow(Context context)
Public Methods
View getColumn(int columnIndex)
int getFirstColumnWidth()
ImageView getImageView(int index)
int getRowWidth()
void setColumnWidths(float... rawColumnWidths)
Sets the widths of the columns from start to end.
void setHeader(boolean header)
void setImage(int index, Drawable image)
Sets the image for the column with the given index.
void setImageDescription(int index, CharSequence desc)
void setImageDescription(int index, int resId)
void setLines(int lines)
Sets number of lines for TextView column.
void setMaxColumnWidth(int maxWidth)
Sets the maximum width of non-sticky columns.
void setMaxStickyColumnWidth(int maxWidth)
Sets the maximum width of the sticky column.
void setText(int index, CharSequence text)
Sets the text for the column with the given index.
void setTextAlignment(int... alignments)
Sets the text alignment of the columns in the row.
void triggerRipple(MotionEvent event)
Protected Methods
void configureText(View child, int index)
void onLayout(boolean changed, int l, int t, int r, int b)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
void setStickyMode(boolean mode)
[Expand]
Inherited Methods
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:textLines

Total number of lines.

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

Related Methods

Constants

public static final int ALIGN_END

Constant Value: 1 (0x00000001)

public static final int ALIGN_START

Constant Value: 0 (0x00000000)

Fields

protected int m1lineHeight

protected int m1lineImageHeight

protected int m2linesHeight

protected int[] mAlignments

protected int mColumnDefaultWidth

protected int mColumnMaxWidth

protected int mColumnPaddingH

protected List<View> mColumns

protected int mDefaultHeaderLineHeight

protected int mDefaultHeaderTextSize

protected int mDefaultLineHeight

protected int mDefaultTextSize

protected int mEdgePaddingH

protected int mHeaderHeight

protected boolean mIsHeader

protected int mLines

protected int mMinHeight

protected int[] mPixelColumnWidths

protected float[] mRawColumnWidths

protected int mStickyMaxWidth

protected boolean mStickyMode

Public Constructors

public DataTableRow (Context context)

Public Methods

public View getColumn (int columnIndex)

public int getFirstColumnWidth ()

public ImageView getImageView (int index)

public int getRowWidth ()

public void setColumnWidths (float... rawColumnWidths)

Sets the widths of the columns from start to end. The sticky column has a max width of a third of the screen width.

Parameters
rawColumnWidths [1-max]F for fixed length (dp). Unlike GridTableRow, dynamic width and percentage width are not supported.

public void setHeader (boolean header)

public void setImage (int index, Drawable image)

Sets the image for the column with the given index. If both text and image are set, the image will take priority.

Parameters
index The column the image will be set to.
image The image to be set.

public void setImageDescription (int index, CharSequence desc)

public void setImageDescription (int index, int resId)

public void setLines (int lines)

Sets number of lines for TextView column. Recommends at most 2 lines.

Related XML Attributes

public void setMaxColumnWidth (int maxWidth)

Sets the maximum width of non-sticky columns. By default, this value is half of the screen width.

Parameters
maxWidth The width that columns will be clamped to if they exceed it.

public void setMaxStickyColumnWidth (int maxWidth)

Sets the maximum width of the sticky column. By default, this value is a third of the screen width.

Parameters
maxWidth The width that the sticky column will be clamped to if it exceeds it.

public void setText (int index, CharSequence text)

Sets the text for the column with the given index. Text that is purely numeric will be aligned with the end of the column, while other formats will be aligned with the start of the column.

Parameters
index The column the text will be set to.
text The text to be set.

public void setTextAlignment (int... alignments)

Sets the text alignment of the columns in the row.

Parameters
alignments An array of alignments (ALIGN_START, ALIGN_END).

public void triggerRipple (MotionEvent event)

Protected Methods

protected void configureText (View child, int index)

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

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)

protected void setStickyMode (boolean mode)