ProviderManager

public class ProviderManager<T>

Constructors

Link copied to clipboard
public void ProviderManager()
public void ProviderManager(List<IViewProvider<T>> providerList)

Functions

Link copied to clipboard
public void addProvider(IViewProvider<T> provider)
public void addProvider(int viewType, IViewProvider<T> provider)
Link copied to clipboard
public int getItemViewType(IViewProvider<T> provider)
public int getItemViewType(T item, int position)
Link copied to clipboard
public IViewProvider<T> getProvider(T item)
public IViewProvider<T> getProvider(int viewType)
Link copied to clipboard
public int getProviderCount()
Link copied to clipboard
public void removeProvider(IViewProvider<T> provider)
public void removeProvider(int itemType)
Link copied to clipboard
public void replaceProvider(Class oldProviderClass, IViewProvider<T> provider)
Link copied to clipboard
public void setDefaultProvider(IViewProvider<T> defaultProvider)
设置默认模板。当找不到和 viewType 对应的模板时,使用此默认模板进行 ui 处理。