T
- public interface ViewTemplate<T>
Modifier and Type | Method and Description |
---|---|
android.view.View |
constructView(android.view.ViewGroup parent,
android.view.LayoutInflater inflater)
Construct the view that represents the entry from scratch.
|
void |
decorateViewWithZebra(android.view.View view,
int zebraColor,
boolean isOdd)
Given a non-null view of the same view-type, update the view's background to facilitate
a "zebra" effect (even-odd coloring)
|
int |
getViewType()
Similar to RecyclerView.Adapter#getItemViewType return a view-type to be able
to recognize which views can be recycled.
|
void |
setContent(T value,
android.view.View view)
Given a non-null view of the same view-type, update the view with the given value.
|
int getViewType()
ViewTypes
on
what build-in view-types are already defined.android.view.View constructView(android.view.ViewGroup parent, android.view.LayoutInflater inflater)
parent
- inflater
- void setContent(T value, android.view.View view)
value
- used to fill the viewview
- the recycled viewvoid decorateViewWithZebra(android.view.View view, int zebraColor, boolean isOdd)
view
- a non-null view of the correct typezebraColor
- the highlighted "zebra" color as defined by the viewisOdd
- to easy identify which view has a highlighted zebra background and which not (ie. isOdd has highlighted background)