Skip to content

v2.0.0#34

Merged
saket merged 13 commits intomasterfrom
saket/1aug/detachable-page
Aug 18, 2019
Merged

v2.0.0#34
saket merged 13 commits intomasterfrom
saket/1aug/detachable-page

Conversation

@saket
Copy link
Copy Markdown
Owner

@saket saket commented Aug 4, 2019

Improvements

  • v1 made an assumption that InboxRecyclerView and its ExpandablePageLayout will always share the same parent and have the same width & height. v2 removes this restriction. (Fixes Strange animation #10).
  • It'll now be possible to detach a ExpandablePageLayouts from its InboxRecyclerView, essentially making it possible to use multiple expandable pages with the same list. (Fixes Add a mechanism to reset the page an RV is bound to #32).

Breaking changes

  • InboxRecyclerView.setExpandablePage() is removed in favor of using InboxRecyclerView.expandablePage directly. Kotlin FTW! If you wish to specify the page's collapse threshold then you can again set ExpandablePageLayout.pullToCollapseThresholdDistance directly.
  • PageStateChangeCallbacks functions were updated to include a page: ExpandablePageLayout parameter. I'm not too happy with this change so I'll try reverting this.

@saket saket force-pushed the saket/1aug/detachable-page branch from 8f72c64 to e18830a Compare August 4, 2019 04:24
Reverse-for loops avoided object allocation while allowing callbacks to remove
themselves, but weren't foolproof. CopyOnWriteArrayList returns a new copy of
the underlying array on every iteration so it's safer. It's also more efficient
than using Kotlin's immutable list because it avoids blanket creating a new list
with extra capacity everytime a callback is added or removed.
@saket saket force-pushed the saket/1aug/detachable-page branch from 27a01f9 to 959a489 Compare August 18, 2019 19:29
@saket saket merged commit 34f63b3 into master Aug 18, 2019
@saket saket deleted the saket/1aug/detachable-page branch August 18, 2019 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a mechanism to reset the page an RV is bound to Strange animation

2 participants