接口 WheelViewAdapter
-
public interface WheelViewAdapterWheel items adapter interface
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 PickerConfiggetConfig()ViewgetEmptyItem(View convertView, ViewGroup parent)Get a View that displays an empty wheel item placed before the first or after the last wheel item.ViewgetItem(int index, View convertView, ViewGroup parent)Get a View that displays the data at the specified position in the data setintgetItemsCount()Gets items countvoidregisterDataSetObserver(DataSetObserver observer)Register an observer that is called when changes happen to the data used by this adapter.voidsetConfig(PickerConfig config)voidunregisterDataSetObserver(DataSetObserver observer)Unregister an observer that has previously been registered
-
-
-
方法详细资料
-
getItemsCount
int getItemsCount()
Gets items count- 返回:
- the count of wheel items
-
getItem
View getItem(int index, View convertView, ViewGroup parent)
Get a View that displays the data at the specified position in the data set- 参数:
index- the item indexconvertView- the old view to reuse if possibleparent- the parent that this view will eventually be attached to- 返回:
- the wheel item View
-
getEmptyItem
View getEmptyItem(View convertView, ViewGroup parent)
Get a View that displays an empty wheel item placed before the first or after the last wheel item.- 参数:
convertView- the old view to reuse if possibleparent- the parent that this view will eventually be attached to- 返回:
- the empty item View
-
registerDataSetObserver
void registerDataSetObserver(DataSetObserver observer)
Register an observer that is called when changes happen to the data used by this adapter.- 参数:
observer- the observer to be registered
-
unregisterDataSetObserver
void unregisterDataSetObserver(DataSetObserver observer)
Unregister an observer that has previously been registered- 参数:
observer- the observer to be unregistered
-
getConfig
PickerConfig getConfig()
-
setConfig
void setConfig(PickerConfig config)
-
-