Search code examples
androidandroid-widgetandroid-viewandroid-custom-viewandroid-gui

Add a caption to a WheelView


I'm using the WheelView( http://code.google.com/p/android-wheel/ ) to let users input a number of a certain unit (e.g. kg). I'd like to display the unit of the current value next to it like it is shown in this picture.

WheelView with caption "hour"

Sadly, the WheelView doesn't support labelling (anymore). Any idea how I can implement this?


Solution

  • i know this is not exactly what you want, but the closest thing to it, and it can be done easily. you could include your tag in the format string, like this:

    wheelView.setViewAdapter(new NumericWheelAdapter(getActivity(), 0, 23, "%02d hour"))