MIGRATION
- Within the
onBind
change the RecyclerView.ViewHolder to the ViewHolder class for this item - Remove
viewHolder.itemView.setSelected(isSelected());
from your item - Remove
viewHolder.itemView.setTag(this);
from your item - If you need to prevent default code execution or have any more complex selection handling note the following changed:
withOnPostClickListener
is nowwithOnClickListener
withOnClickListener
is nowwithOnPreClickListener
removeItemRange
renamed toremoveRange
library
- type the IItem interface with the ViewHolder type so the bindView already passes the correct ViewHolder and no casting is required for the dev
- move setSelected to AbstractItem and move setTag to AbstractItem to further minimize code and additional potential for error when using the AbstractItem
- remove onPostClickListener and make the normal click listener to the post one, as this use case is more common
- add new onPreClickListener which will allow you to prevent any further executing of code. Especially if you want to prevent selection handling inside the onClick
- switch samples to use the correct listeners. we need the preClickListener for the collapse items as we want to prevent selection for those.
- implement bindView method inside the
AbstractItem
which will by default do selection and setTag - add super call to items to call default behavior. if you do not need selection you can remove the super call
- add android support annotation to make sure we provide the corect color for the SelectableBackground method
- type withFilterPredicate
- implement new FastItemAdapter for apps which only need one adapter containing items. this wraps an ItemAdapter within the FastAdapter.
- require type for AbstractItem to extend the IItem to prevent using the wrong type here
- rename removeItemRange to removeRange
- implement new TypedAbstractItem and TypedItemAdapter which allow to split up Item and Model into to separat classes
sample
- use the new FastItemAdapter for all samples which only have one adapter
- use correct id for IconItem
- display version number inside aboutLibs
- we return -1 inside the gridLayoutLookup as the default should never get called
- add descriptions to drawer elements
- implement TypedItemActivity to showcase new TypedItemAdapter
- Implement TypedIconItem to showcase usage of TypedAbstractItem
- improve sample
- add new SampleActivity which has a simple ImageItem within a CardView
- new colors
- use LightStatusBar on API >23