Deprecated ! see the updated version of Wheel as a class http://www.b4x.com/forum/basic4android-share-your-creations/18855-wheel-b4a-class.html#post108297
and the new Wheel https://www.b4x.com/android/forum/threads/a-new-wheelview.91645/post-578792
The Wheelview is a complex view, built on a scrollview with labels, and uses a timer to settle on the predefined values of the wheel.
The logic was first shared by birnesoft here http://www.b4x.com/forum/bugs-wishlist/14620-spin-wheel.html#post89984 and many members of the forum contributed to the improvement till we got a really nice tool.
I put the logic into a library, trying to ease the use for developers who don't have time to master the tricks there, but kept several options for personal look preferences, as well as leaving the cover on top to be done by the application.
Attached also a demo program.
Important note : The Tick events and the ReadWheel method are a must for the operation of the wheel.
Please try it and give comments for more functionality/improvements/bugs correction.
Thanks again to all the contibutors.
Edit: Updated to ver 1.1 with additional two methods for updating the values without need to re-initialize, by list or by array.
Also modified the name of SetValue to SetToValue to avoid misunderstandings about the functionality of the method.
Edit: - example app added to ver. 1.1
and the new Wheel https://www.b4x.com/android/forum/threads/a-new-wheelview.91645/post-578792
The Wheelview is a complex view, built on a scrollview with labels, and uses a timer to settle on the predefined values of the wheel.
The logic was first shared by birnesoft here http://www.b4x.com/forum/bugs-wishlist/14620-spin-wheel.html#post89984 and many members of the forum contributed to the improvement till we got a really nice tool.
I put the logic into a library, trying to ease the use for developers who don't have time to master the tricks there, but kept several options for personal look preferences, as well as leaving the cover on top to be done by the application.
Attached also a demo program.
Important note : The Tick events and the ReadWheel method are a must for the operation of the wheel.
Please try it and give comments for more functionality/improvements/bugs correction.
Thanks again to all the contibutors.
Edit: Updated to ver 1.1 with additional two methods for updating the values without need to re-initialize, by list or by array.
Also modified the name of SetValue to SetToValue to avoid misunderstandings about the functionality of the method.
Edit: - example app added to ver. 1.1
Last edited: