Releases: mikepenz/FastAdapter
Releases · mikepenz/FastAdapter
v0.9.0
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
v0.8.1
v0.8.0
general
- update to latest MaterialDrawer SNAPSHOT to allow long ids
library
- change identifiers from
int
tolong
- type getFastAdapter method
- add animateTo method which will animate, removed, added and moved items
- add new onPostClick listener which is called after the selection was set. So it is possible to use the count of selections for a CAB or similar logics
sample
- the sample should define unique ids
- showcase search in sample
v0.7.7
v0.7.6
v0.7.5
v0.7.3
v0.7.2
v0.7.1
v0.7.0
library
- add some more types so everythign through the FastAdapter is typed (if type is provided)
- also type click listeners so they will return the type of the adapter else IItem
- document all remaining methods / properties
- improve selection behavior. there are now 2 different variants of selection. you can toggle this via
withSelectWithItemUpdate
(where false == default -> variant 1)- direct selection via the view "selected" state, we also make sure we do not animate here so no notifyItemChanged is called if we repeatly press the same item
- we select the items via a notifyItemChanged. -> this will allow custom selected logics within your views (isSelected() --> do something...) and it will also animate the change via the provided itemAnimator. because of the animation of the itemAnimator the selection will have a small delay (time of animating)
sample
- use latest MaterialDrawer snapshot
- showcase compatiblity with MaterialScrollBar (added to SimpleActivity)
- expand a item to make example look a bit more interesting
- showcase typed clicklistener in some samples