java.lang.Object | |
↳ | com.h6ah4i.android.widget.advrecyclerview.adapter.ItemViewTypeComposer |
Utility class providing "Composed item view type" related definitions and methods.
Spec:
bit 31 | Expandable group flag (1: expandable group / 0: normal item) |
---|---|
bit 30-24 | View type segment |
bit 23-0 | Wrapped view type code |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | BIT_MASK_EXPANDABLE_FLAG | Bit mask of the expandable flag part. | |||||||||
int | BIT_MASK_SEGMENT | Bit mask of the segment part. | |||||||||
int | BIT_MASK_WRAPPED_VIEW_TYPE | Bit mask of the wrapped view type part. | |||||||||
int | BIT_OFFSET_EXPANDABLE_FLAG | Bit offset of the expandable flag part. | |||||||||
int | BIT_OFFSET_SEGMENT | Bit offset of the segment part. | |||||||||
int | BIT_OFFSET_WRAPPED_VIEW_TYPE | Bit offset of the wrapped view type part. | |||||||||
int | BIT_WIDTH_EXPANDABLE_FLAG | Bit width of the expandable flag part. | |||||||||
int | BIT_WIDTH_SEGMENT | Bit width of the segment part. | |||||||||
int | BIT_WIDTH_WRAPPED_VIEW_TYPE | Bit width of the wrapped view type part. | |||||||||
int | MAX_SEGMENT | Maximum value of segment. | |||||||||
int | MAX_WRAPPED_VIEW_TYPE | Maximum value of wrapped view type. | |||||||||
int | MIN_SEGMENT | Minimum value of segment. | |||||||||
int | MIN_WRAPPED_VIEW_TYPE | Minimum value of wrapped view type. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static int |
composeSegment(int segment, int wrappedViewType)
Makes a composed ID with specified segment and wrapped ID.
| ||||||||||
static int |
extractSegmentPart(int composedViewType)
Extracts "Segment" part from composed view type.
| ||||||||||
static int |
extractWrappedViewTypePart(int composedViewType)
Extracts "Wrapped view type" part from composed view type.
| ||||||||||
static boolean |
isExpandableGroup(int composedViewType)
Checks the composed view type is a expandable group or not.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Bit mask of the expandable flag part.
Bit mask of the segment part.
Bit mask of the wrapped view type part.
Bit offset of the expandable flag part.
Bit offset of the segment part.
Bit offset of the wrapped view type part.
Bit width of the expandable flag part.
Bit width of the segment part.
Bit width of the wrapped view type part.
Maximum value of segment.
Maximum value of wrapped view type.
Minimum value of segment.
Minimum value of wrapped view type.
Makes a composed ID with specified segment and wrapped ID.
segment | Segment |
---|---|
wrappedViewType | Wrapped view type |
Extracts "Segment" part from composed view type.
composedViewType | Composed view type |
---|
Extracts "Wrapped view type" part from composed view type.
composedViewType | Composed view type |
---|
Checks the composed view type is a expandable group or not.
composedViewType | Composed view type |
---|