3.1.2
New features and improvements
RenderableItems
are now iterable and can accept also lists of null items, adding only the non-null ones- Fixed an internal function which can now return null. This could have caused setEmptyItem malfunctioning.
Deprecations
setEmptyItem
. Prefer re-rendering the list when needed instead of relying on setEmptyItem. Check AsyncLoadingActivity in the example app.
Why deprecating this feature?
Because it does not allow to handle different situations in which your list may be empty. Imagine this scenario: you go to a screen and then make an API call which returns you a list of stuff.
- When you land on the page and before you make the API call, your list is empty
- After you execute the API call successfully, your list may be empty
- Some error happens during your API call and your list is empty, but you have to notify the user about the error
So, you actually have 3 different empty states which means different things. By using setEmptyItem
you cannot cover those 3 different scenarios. Removing that feature and using new render features, you can. Check AsyncLoadingActivity
example.
Demo App
- Added fetcher and AsyncLoadingActivity to demonstrate new extended rendering capabilities
- Refactorings and improvements