Since: API Level 2.5
public static interface

WheelInterfaces.Views.WheelViewInterface

com.droidux.pack.wheel.interfaces.WheelInterfaces.Views.WheelViewInterface
Known Indirect Subclasses

Class Overview

Represents a contract to be implemented by wheel views.

See Also
  • com.droidux.widget.wheel

Summary

Public Methods
abstract View asView()
Convert this interface to its corresponding View.
abstract WheelInterfaces.Listeners.OnWheelItemSelectedListener getOnWheelItemSelectedListener()
Gets the item-selected listener registered for this view.
abstract WheelInterfaces.Listeners.OnWheelScrollListener getOnWheelScrollListener()
Gets the scroll listener registered for this view.
abstract View getSelectedView()
Gets the currently selected view.
abstract int getSelection()
Gets the position of the currently selected item in the data set.
abstract void setCallbackDuringFling(boolean shouldCallback)
Whether or not to callback on any listener while the items are being flinged.
abstract void setInterpolator(Interpolator interp)
Sets the interpolator for use by the internal scroller.
abstract void setOnWheelItemSelectedListener(WheelInterfaces.Listeners.OnWheelItemSelectedListener listener)
Registers a listener to be notified when an item is selected.
abstract void setOnWheelScrollListener(WheelInterfaces.Listeners.OnWheelScrollListener listener)
Registers a listener to be notified when the wheel is scrolled.
abstract void setSelection(int position, boolean animated)
Sets the currently selected item, with option to animate the change.
abstract void setSelection(int position)
Sets the currently selected item.
abstract void setSelection(int position, int animationDuration)
Sets the currently selected item, with option to animate the change.

Public Methods

public abstract View asView ()

Since: API Level 2.5

Convert this interface to its corresponding View.

Returns
  • A view object that corresponds to this interface.

public abstract WheelInterfaces.Listeners.OnWheelItemSelectedListener getOnWheelItemSelectedListener ()

Since: API Level 2.5

Gets the item-selected listener registered for this view.

Returns
  • The listener.

public abstract WheelInterfaces.Listeners.OnWheelScrollListener getOnWheelScrollListener ()

Since: API Level 2.5

Gets the scroll listener registered for this view.

Returns
  • The listener.

public abstract View getSelectedView ()

Since: API Level 2.5

Gets the currently selected view.

Returns
  • The view corresponding to the currently selected item, or null if nothing is selected.

public abstract int getSelection ()

Since: API Level 2.5

Gets the position of the currently selected item in the data set.

Returns
  • The position of the currently selected item in the data set.

public abstract void setCallbackDuringFling (boolean shouldCallback)

Since: API Level 2.5

Whether or not to callback on any listener while the items are being flinged. If false only the final selected item will cause the callback. If true, all items between the first and the final will cause callbacks.

Parameters
shouldCallback Whether or not to callback on the listener while the items are being flinged.

public abstract void setInterpolator (Interpolator interp)

Since: API Level 2.5

Sets the interpolator for use by the internal scroller.

Parameters
interp The interpolator.

public abstract void setOnWheelItemSelectedListener (WheelInterfaces.Listeners.OnWheelItemSelectedListener listener)

Since: API Level 2.5

Registers a listener to be notified when an item is selected.

Parameters
listener The listener to be notified.

public abstract void setOnWheelScrollListener (WheelInterfaces.Listeners.OnWheelScrollListener listener)

Since: API Level 2.5

Registers a listener to be notified when the wheel is scrolled.

Parameters
listener The listener to be notified.

public abstract void setSelection (int position, boolean animated)

Since: API Level 2.5

Sets the currently selected item, with option to animate the change. If the position is less than 0, then the item at position 0 will be selected.

Parameters
position Index (starting at 0) of the data item to be selected.
animated If true, the change will be animated (by spinning the wheel).

public abstract void setSelection (int position)

Since: API Level 2.5

Sets the currently selected item. If the position is less than 0, then the item at position 0 will be selected.

Parameters
position Index (starting at 0) of the data item to be selected.

public abstract void setSelection (int position, int animationDuration)

Since: API Level 2.5

Sets the currently selected item, with option to animate the change. If the position is less than 0, then the item at position 0 will be selected.

Parameters
position Index (starting at 0) of the data item to be selected.
animationDuration If greater than 0, the change will be animated for the duration (by spinning the wheel).