Skip to content

v5.0.0-rc2

Pre-release
Pre-release
Compare
Choose a tag to compare
@davideas davideas released this 10 Jun 21:56
· 188 commits to master since this release

⚠️ Warning: If you come from previous versions/snapshots, with this update you MUST review your code. Please, follow the Wiki page Migrations.

New features

  • Resolved #34 - New Customizable FastScroller is now available, thanks to arpinca.
  • Resolved #217 - Extension for data binding.
  • Resolved #259 - Endless scrolling in both directions. If activated, items can only be inserted at the top of the list, top endless is complementary to the bottom endless.
  • Resolved #302 - Allow to use custom LayoutManagers on the RecyclerView.
  • Resolved #382 - New advanced FlexibleItemDecoration.

Deprecations / New Behaviors

  • Update to support library 25.4.0. Read instructions on https://developer.android.com/topic/libraries/support-library/setup.html.
  • Adapter now makes a copy of the provided list at startup, updateDataSet and filterItems, before applying features (from support #316), as consequence you should remove the copy of the list in these 3 situations.
  • onPostUpdate() and onPostFilter() now require to call super() otherwise the emptyView won't get notified!
  • Starting or resetting the Filter will empty the bin of the deletedItems (see #341 and #342).
  • Get rid of Method B to create and bind ViewHolders. From now on, we will use only Method A: we will delegate the previous operations to the item interfaces. Item interfaces will now mandatory implement the following methods: getLayoutRes(), createViewHolder() and bindViewHolder() (see #344).
  • Making use of interface Mode to change selection mode (constants MODE_* are now deprecated).
  • Renamed DividerItemDecoration to FlexibleItemDecoration.
  • Renamed Utils to FlexibleUtils.
  • Resolved #377 - Item content not updating when animating updateDataSet (changing default behavior of notifyChangeOfUnfilteredItems to true).

Improvements

  • Resolved #269 - Setting to load more at startup when adapter list is initially empty/null.
  • Resolved #281 - Delegate spanSize to IFlexible item.
  • Resolved #288 - UndoHelper.remove(...) return type reverted to Snackbar.
  • Resolved #293 - getItemViewType now returns zero when item not found.
  • Optimized updateDataSet() and filterItems(): now hidden items are restored before applying the feature, so they won't get notified for removing and adding same items, but only for updating. This will improve performance avoiding useless notifications.
  • Resolved #293 - getItemViewType now returns zero when item not found.
  • Resolved #321 - Now items have option to be or not to be notified for a change if unfiltered IFlexible.shouldNotifyChange().
  • Resolved #333 - StateListDrawable with state_pressed for API < 21.
  • Resolved #339 - Sticky headers in filtered list.
  • Resolved #343 - Allow to unbind ViewHolder IFlexible.unbindViewHolder().
  • Resolved #348 - Customizable minimum scroll amount to show the FastScroller.
  • Resolved #348 - FastScroller can now be enabled/disabled at runtime again with a better toggle to enable/disable FastScroller.
  • Resolved #357 - Allow usage of Parcelable for IHeaders and IFlexible.
  • Resolved #362 - Improved filter engine: Filter items with optional originalList (works also with multi level).
  • Resolved #363 - Simplified the method createViewHolder() in IFlexible.
  • Resolved #376 - Sticky header preserves current offset from ItemDecorations.
  • Resolved #379 - Preventing possible NullPointerException.
  • Resolved #381 - Provided a better internal log system which does not allocate objects.
  • Created new method setFullSpan() in FlexibleViewHolder.
  • Created new method getCurrentItems(), returns the current internal list unmodifiable.
  • Created new method isFiltering(), returns true if the AsyncTask is currently running.
  • Created new method updateItem() overload method.
  • Added generic type param when returning FlexibleAdapter object.
  • Increased ANIMATE_TO_LIMIT to 1000 items.
  • Support libs to 25.3.1 (from question #331).
  • Project is now built with provided scope for RecyclerView Support lib.
  • New build scripts to support extensions modules.
  • New comprehensive Wiki pages!

Fixes

  • Fixed #268 - Sticky headers don't work when all headers are initially collapsed.
  • Fixed #284 - removeAllScrollableFooters() seems to notify incorrect item range.
  • Fixed #291 - progressItem not hidden automatically if delay is zero and no items loaded or Endless is disabled.
  • Fixed #292 - HandlerCallback mistakenly erases default Runnables posted on it's mHandler.
  • Fixed #294 - Expandable header is not resized / redrawn on automatic configuration change when sticky headers are enabled.
  • Fixed #295 - Items not notified on auto collapse (using normal List instead of Hash to avoid Inconsistency detection. It will be slower on big List when collapsing).
  • Fixed #296 - autoCollapseOnExpand(true) seems not notify the header.
  • Fixed #297 - Empty (Invisible) Header Item when Using Sticky Headers.
  • Fixed #299 - ClassCastException after click on expanded sticky header when AutoCollapse is enabled.
  • Fixed #320 - point 1) Sometimes the sticky header view losses it's background.
  • Fixed #320 - point 2) Sometimes the sticky header is not shown correctly when is being collapsed.
  • Fixed #322 - Loop in getSectionItemPositions().
  • Fixed #328 - Filtering issue during delete search query (make sure index is in bounds).
  • Fixed #347 - Sticky Header doesn't update selected view state correct for Single & Multi selection.
  • Fixed #352 - Multilevel expandable list - Sub-Sub-Items are now filtered
  • Fixed #350 - LayoutManager is now independent to be initialized before/after setting adapter.
  • Fixed #365 - Fixed condition for showing header.
  • Fixed #369 - FastScroller fix - Added OnScrollListener in onAttachedToWindow() as counterpart of onDetachedFromWindow(), when ViewPager Adapter is changed at runtime.
  • Fixed #371 - Bug in positions calculation in clearAllBut().
  • Fixed #372 - clearAllBut() clears everything when no view type is specified (now Scrollable items are retained as Javadoc states).
  • Fixed #373 - java.util.ConcurrentModificationException with Undo after multiple rapid swipe removals.

DemoApp

  • Modified demoApp to not show LayoutInfo at each use case.
  • Fixed ButterKnife binding.
  • Updated Robolectric test library to v3.3.2 to support API 25.
  • Added unit tests for updateDataSet().
  • Added unit tests for clearAllBut().
  • Better Toolbar Styles for API preLollipop.
  • Adapted the demoApp to the new FlexibleItemDecoration and fixed some bugs around.

ℹ️ Note:

  • Sample App has new package signature, please manually uninstall the previous to avoid duplication.
  • If swipe does not properly animate: please be sure that FrontView is at lower level in the layout to support API < 21.