2020-05-05
- Migrate to AndroidX
2020-04-27
- Update
observableData
to accept aDiffComputation
arg to enforce either synchronous or asynchronous diff computation
2020-04-08
- Fix bug where
observableData
default loading behavior didn't cease loading when an empty list was emitted
2019-09-09
- Add parameter to
observableData
andtoData
that allows the caller to specify theScheduler
on which diffs are computed
2019-09-06
- Add support for change notification payloads
2019-08-20
- Fix inconsistency error when using
observableData
orObservable<out Collection<T>>.toData
2019-03-01
- Add
@CheckResult
to various APIs - Add
buildAdapter
builder - Deprecate
adapter
builder - Fix bug where error message was not reset when
Data
changed onDataLayout
2019-02-21
- Update to support library 28
- Target API 28
- Fix bug where
observableData
subscribed on the computation scheduler - Fix
power-adapters-support-v4
failing to jetify properly
2018-7-03
- Allow comparing
PowerAdapter.getItemViewType()
to aViewFactory
2018-7-02
- Add Kotlin
observableData
diff strategyNone
2018-6-26
- Fix bug where Kotlin
observableData
default loading behavior emitted too early, making it appear that the data set was empty briefly, causing a visual glitch in many cases
2018-6-22
- Add Kotlin reactive
Data
top-level functionobservableData
2018-6-22
- Fix bug where
ObservableDataBuilder
createdData
with loading remainingtrue
after content error - Fix bug where
ObservableDataBuilder
created multiple subscriptions to the content observable
2017-10-18
- Migrate to RxJava 2.x
- Add
Binder.withStableIds()
Kotlin extension function - Add
Binder.withViewType()
Kotlin extension functions - Add
Data.toAdapter()
Kotlin extension functions - Add
List.toAdapter()
Kotlin extension functions - Add Kotlin top-level function
viewFactory()
- Bump minSdk to
14
- Fix bug in DiffList where clear() failed to dispatch a remove notification
2017-06-27
- Add
Data.fromList
and Kotlin methoddata(() -> List<T>, ExecutorService)
, which create aData<T>
that presents an asynchronously loaded list - Add
Data.fromCursor
and Kotlin methodcursorData(() -> Cursor, (Cursor) -> T, ExecutorService)
, which create aData<T>
that presents the contents of a asynchronously loaded databaseCursor
- Remove
ArrayData.onClear()
- Make
ArrayData.asList()
final
- Add
ArrayData
constructor that accepts anExecutorService
for performing the asynchronous load - Add
Binder.inflate(ViewGroup, @LayoutRes int)
convenience method - Add
DataExecutors
for accessing the defaultExecutorService
(s) used by the library
2017-04-07
- Add Kotlin modules, which add Kotlin-idiomatic extensions
- Expand on RxJava bridging modules:
- Move many APIs from
power-adapters-data-rx
into new modulepower-adapters-rx
- Add
ObservableAdapterBuilder
andObservableDataBuilder
, for creating adapters andData
objects based on RxJavaObservable
s. Both useDiffUtil
internally to dispatch fine-grained notifications, and thus have full item animation support. - Add
Observable
-basedCondition
s, available in theRxCondition
class.
- Move many APIs from
- Add
Mapper
type paramT
, which lets callers specify an upper bound of types theMapper
handles. - Fix some
Binder
API generics variance problems, making them much more flexible. MapperBuilder
now evaluates rules from top to bottom. This can result in breaking changes if your usages relied on the previous behavior of evaluating rules based on class.- Add
PowerAdapter.wrapItems
, for wrapping item views in anotherViewGroup
to apply extra layout effects. - Remove aggressive notification consistency verification, allowing for batches of notifications to be dispatched as
long as they are consistent by the time
RecyclerView
responds to them. This mainly affects customData
orPowerAdapter
implementations. - Deprecate
DataBindingAdapter(Data, Binder)
,DataBindingAdapter(Data, Mapper)
, and addDataBindingAdapter(Binder, Data)
,DataBindingAdapter(Mapper, Data)
to be consistent with other APIs. - Add more helper conditions to
DataConditions
. - Removed
RecyclerView
andListView
converter adapter caching, as it caused a memory leak in certain use cases. This meansRecyclerPowerAdapters.toRecyclerAdapter(adapter) != RecyclerPowerAdapters.toRecyclerAdapter(adapter)
, ie, you can longer rely on the same instance being returned fromtoRecyclerAdapter
for a given input adapter. - Remove many unnecessary methods by eliminating synthetic accessors to private members.
- Remove Lombok annotations, replacing them with Android support annotations. Runtime
null
checks are still present. - Fix a few other misc memory leaks.
2016-11-30
- Fix bug where
ArrayData
andIncrementalArrayData
emitted notifications that were not consistent with their reportedsize
2016-11-16
- Fix incorrect return type of
BindViewFunction
2016-10-31
- Add
Container
API:Container
grants access to the context in which adapter items are bound, so aBinder
can control scrolling or access the enclosingViewGroup
.- Add
Container
argument toPowerAdapter.bindView
. - Add
Container
argument toBinder.bindView
. - Add
Container
argument toViewHolderBinder.bindView
.
- Add
PowerAdapters.toSpinnerAdapter
method, for converting aPowerAdapter
toandroid.widget.SpinnerAdapter
(see javadoc for restrictions, however.) - Make
RecyclerConverterAdapter
public, and available for extension, since this is sometimes needed to interact with otherRecyclerView
libraries. RecyclerConverterAdapter
now avoids some kinds of memory leaks by unregistering from the wrappedPowerAdapter
while theRecyclerView
is detached from the window. This means you no longer need to nullify theRecyclerView
adapter manually to prevent leaks.- Add static factory methods to
Binder
andViewHolderBinder
. These reduceBinder
declaration boilerplate for simple use cases. - Fix bug where
RxData.available
andRxData.loading
never emitted values. - Fix bug where
FilterData
(accessed viaData.filter
) updated its index incorrectly in response to batch removals. - Deprecate
AbstractBinder
. Replace uses of this withBinder
, which has been made an abstract class. - Fix bug where extra unwelcome calls to
DataLayout.onFinishInflate
caused some child components to become invisible. - Remove deprecated classes:
TypedBinder
EmptyAdapterBuilder
FooterAdapterBuilder
HeaderAdapterBuilder
LoadingAdapterBuilder
DataEmptyDelegate
DataLoadingDelegate
- Remove deprecated methods:
ViewFactories.viewFactoryForResource