Default spinners on the iPhone look a lot better than on Android. It looks like at least one Android app (UrbanSpoon) has been able to replicate this control, and it's awesome: http://www.urbanspoon.com/android
Anyone have any ideas on how to create this? Code would be helpful.
If you don't need support for the trackball, then all it will take is WebView along with some minor tweaks to some existing JavaScript that impersonates Apple's UIPickerView to create applications like this.
Fancy Spinner Image http://i47.tinypic.com/aymyjc.jpg
A majority of the hard work has been done by Matteo Spinelli so start by downloading his code and then apply these changes to
spinningwheel.js
. His code wants to pop up the picker from the bottom of the screen with cancel and done buttons so we need to modify a few lines to eliminate this behavior.Additionally, the
index.html
he provides isn't exactly what you want so replace it with this one and then copy the html, css, js, and png files into the assets directory of your project.Create an Activity that enables JavaScript in a WebView and has callbacks for it to return the selection.
Finally, modify your layout so has a WebView with its height set appropriately.
From the screenshot, it looks like it is just a list view with some special styling to make it look rounded. In terms of behavior, I don't think it would be any different from a ListView where the middle item is considered the selected value.