B4A Library WheelView Library

aardsoft

Member
Licensed User
Longtime User
I must be thick

I have downloaded both wheelview.zips and extracted. I load the project into Basic4Android. It doesn't run as it complains of a missing library reference for wheelview as a type.
Dim wv1,wv2,wv3 As WheelView
what am I doing wrong? I'm under the delusion that a demo should just download and run.
 

NJDude

Expert
Licensed User
Longtime User

You need to download and install the library, it's attached on the first post.

You also have to reference that library in the B4A IDE.
 

AllanH

Member
Licensed User
Longtime User
Wheelview by library

Please take a look at "Wheel by B4A class" section
The mechanics of the wheelview are relatively small and I think better provided by a class that can be inherited/modified to specific requirements than a java library that only a few wise ones can tinker with. There is no real java-magic required.

BW

Allan
 

Johan Schoeman

Expert
Licensed User
Longtime User
I have been playing around with WheelView. When the app starts for the first time after installation the date in all three wheels (day of month, month, year) are correct. If you spin the wheels, close the app, and then start the app again then occasions the wheels do not have the correct info in them for the current day of month, month, and year. Anyone else came accross this and have a solution for it?
 

derez

Expert
Licensed User
Longtime User
It is a known problem of the wheel, in some applications it sometimes "does not start" until an event occures. Try to add several doevents after the wheel creation.
 

Johan Schoeman

Expert
Licensed User
Longtime User
Don't know if it id the right/correct solution but if you call "show_today" from SUB Activity_Resume (the only line of code that I have in this sub) then it seems to solve the problem. Have not had a failed start of day, month, year in any of the wheels despite numerous attempts.
 

derez

Expert
Licensed User
Longtime User
If it helps - then it is a good idea. In my devices the example works also in activity_create but I'll check it in other implementations.
 

derez

Expert
Licensed User
Longtime User
Checked in one that has this problem - and it helps !
Thank you
 

Mashiane

Expert
Licensed User
Longtime User
I have 4 wheels in my control depending on each other. You select an item on the first wheel and the second wheel is updated, when the second is selected it updated the third and the fourth wheel and when the third is updated, the fourth gets updated. Im using the .UpdateList method for each wheel. This works fine however how do I set the wheen item displayed to be the first item on the wheel, currently they all display the last items.

I've tried to use .SetValueTo(0), assuming that 0 is the index of the first item in each wheel, however this is not working. Can you please advise?
 

derez

Expert
Licensed User
Longtime User
run the setvalueto from activity_resume, after the wheels have been initialized and set.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…