# ProviderManager

public class ProviderManager<T>

## Constructors

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

## Functions

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