Bignerdranch Expandable Recycler View Versions Save

[DEPRECATED]

v3.0.0-RC1

7 years ago

Fixes #89, #108, #137, #138, #139, #157, #239, #241, #256, #262

  • Added implementation of notifyDataSetChanged() called notifyParentDataSetChanged(), please read the documentation for the method before considering using it.
  • Added generic types for the Parent and Child model objects inside of ExpandableRecyclerAdapter
    • ParentListItem interface now takes a generic object type, which allows for getChildItemList to return a typed List instead of List<?>
    • The ExpandableRecyclerAdapter takes two more generic object types
      • A child model object of any type
      • A parent model object that must extend ParentListItem which includes the previous child type
    • As a result onBindParentViewHolder and onBindChildViewHolder now give the specific object type specified in the class
    • Cleaned up a lot of internal logic within ExpandableRecyclerAdapter to avoid casting to Object
    • Removed protected method getListItem, with generics it is now more sane to access mItemList yourself if you need it in the subclass
  • Rename of ParentListItem and ChildListItem, this affects many getters and setters names to eliminate the item word. Some examples:
    • Parent interface now has the method getChildList() instead of getChildItemList()
    • ExpandableRecyclerAdapter renamed method from getParentItemList() to getParentList()
    • All the notify methods now are name notifyParent... instead of of notifyParentItem... (Same for children)
    • The ExpandCollapseListener has methods onParentExpanded and onParentCollapsed instead of onListItemExpanded
  • Changed the name and visibility of onParentListItemExpanded and onParentListItemCollapsed
    • Now protected and named parentExpandedFromViewHolder and parentCollapsedFromViewHolder
    • Not meant to be called from outside the adapter and viewholder, can be overriden to give some custom behaviour for collapsing/expanding
  • Added support for multiple view types within recyclerview
    • getParentViewType(), getChildViewType(), and isParentViewType() added with default implementation for single view type
    • Modified signatures of onCreateParentViewHolder() and onCreateChildViewHolder() to pass view type being created
  • ParentViewHolder package location modified from com.bignerdranch.expandablerecyclerview.Adapter.ExpandableRecyclerAdapter to com.bignerdranch.expandablerecyclerview.ExpandableRecyclerAdapter
  • ChildViewHolder package location modified from com.bignerdranch.expandablerecyclerview.Adapter.ExpandableRecyclerAdapter to com.bignerdranch.expandablerecyclerview.ExpandableRecyclerAdapter
  • Added ParentViewHolder methods:
    • getParent()
    • getParentAdapterPosition()
  • Added ChildViewHolder methods:
    • getChild()
    • getParentAdapterPosition()
    • getChildAdapterPosition()
  • Added SimpleParentListItem for quick implementation of ParentListItem interface (no need to override methods or subclass)

v3.0.0-SNAPSHOT

7 years ago
  • Added support for multiple view types within recyclerview
    • getParentItemViewType(), getChildItemViewType(), and isParentViewType() added with default implementation for single view type
    • Modified signatures of onCreateParentViewHolder() and onCreateChildViewHolder() to pass view type being created
  • ParentViewHolder package location modified from com.bignerdranch.expandablerecyclerview.Adapter.ExpandableRecyclerAdapter to com.bignerdranch.expandablerecyclerview.ExpandableRecyclerAdapter
  • ChildViewHolder package location modified from com.bignerdranch.expandablerecyclerview.Adapter.ExpandableRecyclerAdapter to com.bignerdranch.expandablerecyclerview.ExpandableRecyclerAdapter
  • Added ParentViewHolder methods:
    • getParentListItem()
    • getParentAdapterPosition()
  • Added ChildViewHolder methods:
    • getChildListItem()
    • getParentAdapterPosition()
    • getChildAdapterPosition()

v2.1.1

8 years ago
  • Updated Support Library dependencies

v2.1.0

8 years ago
  • Improved expand/collapse performance
    • Reduced frequency of notify calls in expand/collapse methods
  • Added ability to expand and collapse list items by range
    • Added ExpandableRecyclerAdapter.expandParentRange so that a subset of parents in a list can be expanded at once with one call
    • Added ExpandableRecyclerAdapter.collapseParentRange so that a subset of parents in a list can be collapsed at once with one call
  • Added additional notifyDatasetChanged methods
    • Added ExpandableRecyclerAdapter.notifyParentItemRangeRemoved to notify the RecyclerView when a subset of parents is removed
    • Added ExpandableRecyclerAdapter.notifyParentItemRangeChanged to notify the RecyclerView when a subset of parents is changed
    • Added ExpandableRecyclerAdapter.notifyChildItemRangeInserted to notify the RecyclerView when a subset of children is inserted
    • Added ExpandableRecyclerAdapter.notifyChildItemRangeRemoved to notify the RecyclerView when a subset of children is removed
    • Added ExpandableRecyclerAdapter.notifyChildItemRangeChanged to notify the RecyclerView when a subset of children is changed
    • Added ExpandableRecyclerAdapter.notifyParentItemMoved to notify the RecyclerView when a parent's adapter position is changed
    • Added ExpandableRecyclerAdapter.notifyChildItemMoved to notify the RecyclerView when a child's adapter position is changed
  • Replaced content in vertical linear sample with a more realistic, food-themed example

v2.0.4

8 years ago
  • Fix crash when restoring state when an initially expanded row has been collapsed

v2.0.3

8 years ago
  • Change onListItemExpanded and onListItemCollapsed to be called after list is updated, fixes bug in issue #112

v2.0.2

8 years ago
  • Fix notifyChildItemChanged and notifyParentItemChanged, previously child objects were not being replaced

v2.0.1

8 years ago
  • Fix crash occurring when using notifyParentItemRangeInserted to add a group of items at the end of the list

v2.0.0

8 years ago
  • Significant renaming/reorganizing of library
    • ParentObject is now named ParentListItem.
    • ExpandableRecyclerAdapter#mHelperItemList now has protected visibility and is named mItemList. This List can be used to gain access to all expanded list items.
    • ParentItemClickListener is now ParentViewHolder.ParentListItemExpandCollapseListener.
  • Fleshed out Javadocs.
  • Added ability to specify if a parent should be expanded initially.
  • Added ability to expand and collapse list items programmatically (without relying on a click event).
  • Added ExpandableRecyclerAdapter.ExpandCollapseListener.
  • Added horizontal linear sample project, demoing many of the new features in 2.0.0.
  • Added ability to notify the adapter of changes to the parent list items and child items. Methods begin with notifyParentItem or notifyChildItem
    • Note: RecyclerView.Adapter's notify methods will not work correctly with this adapter.
  • Reorganized sample project.
  • Removed setChildObjectList from ParentListItem interface.
  • Removed inaccurate "stable" id map.
  • Removed application tag from manifest.
  • Removed animation and click handling details from the adapter, ParentViewHolder now has methods used for implementing that behavior in your own subclasses (examples given in the samples with this library).
  • README updates
    • Added usage instructions for new features.
    • Updated references to the library where naming has changed.
  • Bug fixes: #42, #46, #47

v1.0.3

8 years ago

Initial Release