Rowpublic class Row extends Object A row in a RowsFragment. This is the base class for all rows.
You will typically use a {@link ListRow}, but you may override this class
for non-list Rows. |
Fields Summary |
---|
private static final int | FLAG_ID_USE_MASK | private static final int | FLAG_ID_USE_HEADER | private static final int | FLAG_ID_USE_ID | private int | mFlags | private HeaderItem | mHeaderItem | private long | mId |
Constructors Summary |
---|
public Row(long id, HeaderItem headerItem)Constructor for a Row.
setId(id);
setHeaderItem(headerItem);
| public Row(HeaderItem headerItem)Constructor for a Row.
setHeaderItem(headerItem);
| public Row()Constructor for a Row.
|
Methods Summary |
---|
final int | getFlags()
return mFlags;
| public final HeaderItem | getHeaderItem()Get the {@link HeaderItem} that represents metadata for the row.
return mHeaderItem;
| public final long | getId()Returns a unique identifier for this row. This id can come from one of
three places:
- If {@link #setId(long)} is ever called on this row, it will return
this id.
- If {@link #setId(long)} has not been called but the header item is
not null, the result of {@link HeaderItem#getId()} is returned.
- Otherwise {@link ObjectAdapter#NO_ID NO_ID} is returned.
if ( (mFlags & FLAG_ID_USE_MASK) == FLAG_ID_USE_HEADER) {
HeaderItem header = getHeaderItem();
if (header != null) {
return header.getId();
}
return NO_ID;
} else {
return mId;
}
| final void | setFlags(int flags, int mask)
mFlags = (mFlags & ~mask) | (flags & mask);
| public final void | setHeaderItem(HeaderItem headerItem)Set the {@link HeaderItem} that represents metadata for the row.
mHeaderItem = headerItem;
| public final void | setId(long id)Set the id for this row.
mId = id;
setFlags(FLAG_ID_USE_ID, FLAG_ID_USE_MASK);
|
|