Monday, 2 July 2012

Custom Wheel Widget.

Android provides a DatePicker widget, but not an iPhone-like. The android-wheel project helps in building similar components, with a range of controls.
To build a widget using android-wheel, the project should be checked out from SVN and be referenced as an android library. The google project contains 'wheel' and 'wheel-demo' modules.
Quick Notes On The Widget
Package : kankan.wheel.widget is the base package.
View : WheelView is the View class that creates the wheel.
Listeners : OnWheelChangedListener, OnWheelScrollListener, OnWheelClickedListener support wheel actions like onChanged, onScrollingStarted, onScrollingFinished & onItemClicked.
Adapter(s) :
  • WheelViewAdapter is the adapter interface for the wheel items.
  • NumericWheelAdapter is a concrete implementation to support numeric values.
  • ArrayWheelAdapter<T> is a concrete implementation to support <T>
  • Custom implementations of WheelViewAdapter can be written using AbstractWheelTextAdapter. 

    Screen Shot:  



  1. Wow! Thank you for your post! It's very very helpful!

  2. Hi,

    Got 404, while i tried to get source code...

  3. Hi,

    Got 404, while I tried to get source code!!!