Skip to content

Commit

Permalink
Merge pull request #2 from noties/v3
Browse files Browse the repository at this point in the history
V3
  • Loading branch information
noties authored Mar 31, 2021
2 parents ade6d45 + 234afb8 commit 45401e1
Show file tree
Hide file tree
Showing 223 changed files with 8,491 additions and 4,165 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Changelog

## 2.2.0
# 2.3.0-SNAPSHOT
* Add `ItemViewGroup` for a group of items with the usage of `AdaptViewGroup`
* Add `ViewState` utility to save/restore view state (deprecated `NestedRecyclerState`)
* Add `@CheckResult` for `Holder.requireView` methods
* Add `HasChildrenItems` common interface for a group item (`ItemGroup` and `ItemViewGroup`)
* Add `Adapt#onSaveInstanceState` and `Adapt#onRestoreInstanceState` for easier state saving/restoration
* Add `AdaptViewGroup.ChangeHandler` with `ChangeHandlerDef` and `TransitionChangeHandler` implementations
* Add `AdaptViewGroup#findItemForView` method
* `AdaptViewGroup` checks if Item returns a View already attached to a parent
* `StickyItemDecoration`: use view-type from supplied item (for wrapped items), allow exact size of
header (instead of assuming that height is `wrap_content`)

# 2.2.0
* create `ItemGroup` for easier nested RecyclerView support
* create `ItemLayoutWrapper` for easier wrapping of an `Item` inside a different layout
* add `HasWrappedItem` interface (2 implementations - `ItemWrapper` and `ItemLayoutWrapper`)
Expand Down
16 changes: 16 additions & 0 deletions DOC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
attempt at creating proper abstraction for re-usable view components across different contexts

# Item
* ~~Override `equals` when in RecyclerView and diff is used to detect if contents are the same~~

## ViewGroup
* _if wrapping happens_, then diff must use a different logic, to check viewType properly and then id,
currently class is compared directly

## Wrapping
* distinct viewType for a wrapping chain
`Padding Margin Item` and `Margin Padding Item` are not the same
`Padding Margin Item` and `Padding Item` are not the same
* uniqueness of generated viewType combined with reliable generator that can
be proven and does not rely on some randomness of hashcode

Loading

0 comments on commit 45401e1

Please sign in to comment.