Class PagedLiveData<T>

java.lang.Object
android.arch.lifecycle.LiveData<T>
android.arch.lifecycle.MutableLiveData<T>
com.abubusoft.kripton.android.livedata.KriptonLiveData<T>
com.abubusoft.kripton.android.livedata.PagedLiveData<T>
Type Parameters:
T - the generic type
All Implemented Interfaces:
PagedResult, PageNavigator, PageRequest

public abstract class PagedLiveData<T>
extends KriptonLiveData<T>
implements PagedResult

The paged version of KriptonLiveData. A paged live data allows to move in the dataset with three parameters:

  • pageNumber: current page.
  • pageSize: is the number of elements retrieved from datasource. It is also used to define iteraction with
  • offset: it is an alternative to page as navigation system. It rapresents the distance from the first row. If you mix offset and
  • totalElements: total number of elements
  • nextPage, the behaviour will be strange (but not wrong). Just remember that nextPage and previousPage work with pages and not with offset.
Author:
Francesco Benincasa (info@abubusoft.com)