Skip to content

Releases: mikepenz/FastAdapter

v0.9.0

18 Jan 23:13
Compare
Choose a tag to compare

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 now withOnClickListener
    • withOnClickListener is now withOnPreClickListener
  • removeItemRange renamed to removeRange

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

15 Jan 23:58
Compare
Choose a tag to compare

library

  • provide simple drag helper api inside the FastAdapter

sample

  • implement sample for drag support
  • update sample to latest snapshot

v0.8.0

15 Jan 22:47
Compare
Choose a tag to compare

general

  • update to latest MaterialDrawer SNAPSHOT to allow long ids

library

  • change identifiers from int to long
  • 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

14 Jan 21:16
Compare
Choose a tag to compare

library

  • add getter for the TypeInstacnes

v0.7.6

14 Jan 20:10
Compare
Choose a tag to compare
  • change UndoHelper and make it more useful for more complex usecases

v0.7.5

14 Jan 18:51
Compare
Choose a tag to compare

general

  • update to latest build tools
  • change artifactId to reflect only artifactId for jCenter

library

  • fix default Marshmallow pressed selector
  • add new listener which can be used to overwrite onCreateView and onBindView behavior

v0.7.3

13 Jan 23:27
Compare
Choose a tag to compare

library

  • add new UIUtil method which allows to have a pressed StateListDrawable state
    • also allow to animate the fade inbetween the states

v0.7.2

13 Jan 22:15
Compare
Choose a tag to compare

library

  • implement new feature to disable the deselection when a user clicks

sample

  • fix classCastException in sample

v0.7.1

11 Jan 21:40
Compare
Choose a tag to compare

library

  • improve notifyItemMoved algorithm

v0.7.0

11 Jan 20:25
Compare
Choose a tag to compare

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