public interface BindingCollectionAdapter<T>
BindingListViewAdapter,
BindingViewPagerAdapter| Modifier and Type | Method and Description |
|---|---|
T |
getAdapterItem(int position)
Returns the item in the adapter given position.
|
ItemBinding<T> |
getItemBinding()
Returns the
ItemBinding that the adapter that was set. |
void |
onBindBinding(ViewDataBinding binding,
int variableId,
int layoutRes,
int position,
T item)
Called to bind the given item to the binding.
|
ViewDataBinding |
onCreateBinding(LayoutInflater inflater,
int layoutRes,
ViewGroup viewGroup)
Called to create a binding.
|
void |
setItemBinding(ItemBinding<T> itemBinding)
Sets the item biding for the adapter.
|
void |
setItems(java.util.List<T> items)
Sets the adapter's items.
|
void setItemBinding(ItemBinding<T> itemBinding)
ItemBinding<T> getItemBinding()
ItemBinding that the adapter that was set.java.lang.NullPointerException - if the item binding was not set.void setItems(java.util.List<T> items)
ItemBinding. If
you pass in an ObservableList the adapter will also update itself based on that
list's changes. ObservableList, you must call notifyDataSetChanged() or one of
the related methods.T getAdapterItem(int position)
ViewDataBinding onCreateBinding(LayoutInflater inflater,
int layoutRes,
ViewGroup viewGroup)
layoutId and viewGroup. A subclass may override this and cast the result to a
specific layout binding to get at the generated view fields.void onBindBinding(ViewDataBinding binding,
int variableId,
int layoutRes,
int position,
T item)