public class AppList<T extends ViewModel>
extends java.lang.Object
| Constructor and Description |
|---|
AppList() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
T t)
This method adds view model to index without removing loader
|
boolean |
add(T t) |
boolean |
addAll(int index,
java.util.List<T> t) |
boolean |
addAll(java.util.List<T> t) |
boolean |
addLoader(int index,
T t) |
void |
attach(ListObserver observer) |
void |
changed(T t,
java.lang.String payload) |
void |
clearList(int clearListFrom)
Clears list from position and stops loader.
|
void |
error() |
T |
get(int index) |
int |
getAddPositionOfLoader() |
java.util.ArrayList<T> |
getList()
Should only be used by App Recyceler view
|
int |
indexOf(T t) |
void |
moveToPosition(int position) |
void |
noResult() |
void |
notifyItemAddedObservers(int position) |
void |
notifyItemRemovedObservers(int position) |
void |
notifyItemsAddedObservers(int from,
int count) |
void |
notifyItemsRemovedObservers(int from,
int count) |
void |
notifyLoaderAddedObservers(int position,
T t) |
void |
notifySwitchLayoutManager(int index) |
boolean |
remove(T t) |
void |
removeLoader(int clearListFrom,
boolean retry,
boolean noResult)
It 1.
|
int |
size() |
void |
switchLayoutManager(T t) |
public java.util.ArrayList<T> getList()
public int size()
public T get(int index)
public void attach(ListObserver observer)
public void switchLayoutManager(T t)
public void changed(T t, java.lang.String payload)
public boolean add(T t)
public void add(int index,
T t)
public boolean addAll(java.util.List<T> t)
public boolean addAll(int index,
java.util.List<T> t)
public boolean remove(T t)
public boolean addLoader(int index,
T t)
public void removeLoader(int clearListFrom,
boolean retry,
boolean noResult)
clearListFrom - signifies two things
1. if clearListFrom > -1 means its pull to refresh hence we need to remove all other items else point 2 is skipped
2. To removel all other items we need position where to remove from which is defined in clearListFrom param itselfpublic void clearList(int clearListFrom)
public int getAddPositionOfLoader()
public int indexOf(T t)
public void notifySwitchLayoutManager(int index)
public void notifyLoaderAddedObservers(int position,
T t)
public void notifyItemAddedObservers(int position)
public void notifyItemsAddedObservers(int from,
int count)
public void notifyItemRemovedObservers(int position)
public void notifyItemsRemovedObservers(int from,
int count)
public void noResult()
public void error()
public void moveToPosition(int position)