java.lang.Object | ||
↳ | androidx.recyclerview.widget.RecyclerView.Adapter<VH extends androidx.recyclerview.widget.RecyclerView.ViewHolder> | |
↳ | com.sap.cloud.mobile.fiori.formcell.SectionedRecyclerViewAdapter |
Filter activity will be displayed using a Recycler View. Divide the recycler view into Sections and Rows within Sections. Maintain a list holding information on what type of view will be used at a particular row in a section. Application developer needs to implement the abstract functions of this class providing the information about the views at a row in a section
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | SectionedRecyclerViewAdapter.FormCellHolder | View holder for FormCell | |||||||||
class | SectionedRecyclerViewAdapter.SectionHeaderFooter |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SectionedRecyclerViewAdapter() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
final int |
getItemCount()
Return number of items in the RecyclerView
| ||||||||||
abstract int |
getItemCountForSection(int section)
Returns the number of views in a section of the RecyclerView
| ||||||||||
final int |
getItemViewType(int position)
Return the itemType for the position.
| ||||||||||
abstract int |
getItemViewType(int section, int row)
Return the enum for the control at the given row in the section
| ||||||||||
abstract int |
getNumberOfSections()
Returns the number of sections in the view
| ||||||||||
int |
getSeparatorViewType()
Returns the number of sections in the view
| ||||||||||
abstract void |
onBindCellHolder(SectionedRecyclerViewAdapter.FormCellHolder cellHolder, int section, int row)
Bind the data values to the control at the row in a section.
| ||||||||||
void |
onBindViewHolder(SectionedRecyclerViewAdapter.FormCellHolder holder, int position)
Bind the view at the given position with the corresponding class holder
| ||||||||||
SectionedRecyclerViewAdapter.FormCellHolder | onCreateViewHolder(ViewGroup parent, int viewType) | ||||||||||
void | registerCellCreator(int code, FormCellCreator cellCreator) | ||||||||||
void | setFooterEnabled(boolean footerEnabled) | ||||||||||
void | setHeaderEnabled(boolean headerEnabled) | ||||||||||
void | setSeparatorEnabled(boolean separatorEnabled) |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
hasFooter(int section)
Does the given section has the header
| ||||||||||
boolean |
hasHeader(int section)
Does the given section has the header
| ||||||||||
boolean |
hasSeparator(int section)
Does the given section has the separator
| ||||||||||
void |
onBindFooter(SectionedRecyclerViewAdapter.FormCellHolder holder, int section)
Bind the captions on the separator
| ||||||||||
void |
onBindHeader(SectionedRecyclerViewAdapter.FormCellHolder holder, int section)
Bind the captions on the separator
| ||||||||||
void |
onBindSeparatorViewHolder(SectionedRecyclerViewAdapter.FormCellHolder holder, int section)
Bind the captions on the separator
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Return number of items in the RecyclerView
Returns the number of views in a section of the RecyclerView
section | section number for the view |
---|
Return the itemType for the position.
position | position of the view in the Recycler View |
---|
Return the enum for the control at the given row in the section
section | section number for the View |
---|---|
row | row number for the view |
Returns the number of sections in the view
Returns the number of sections in the view
Bind the data values to the control at the row in a section. Application developer will have to cast the base control object to the specific control type.
cellHolder | object of the FormCell at this position |
---|---|
section | section number of the view |
row | row number of the view |
Bind the view at the given position with the corresponding class holder
holder | View holder |
---|---|
position | position of the view in the Recycler View |
Does the given section has the header
section | section number |
---|
Does the given section has the header
section | section number |
---|
Does the given section has the separator
section | section number |
---|
Bind the captions on the separator
holder | MultiSelectViewHolder |
---|---|
section | int |
Bind the captions on the separator
holder | MultiSelectViewHolder |
---|---|
section | int |
Bind the captions on the separator
holder | MultiSelectViewHolder |
---|---|
section | int |