Spin wheel

birnesoft

Active Member
Licensed User
Longtime User
Time Set via Scrollview B4A

Hallo,

I was asking the same to me.

Here is my solution, nearly like a wheel.




:sign0013:,the code is very dirty.

hope you can use for your case.

good luck

Björn Roth
 

Attachments

  • wheel.zip
    332.6 KB · Views: 1,126

Erel

B4X founder
Staff member
Licensed User
Longtime User
Thank you for sharing this.
You should use 'dip' units for all the pixels size values. Otherwise it will not scale correctly.

On the device I tested it the white lines are not in the exact correct position.

You should use File - Export as zip when uploading files to the forum. The current zip file includes many unnecessary files.
 

Frankt

New Member
Licensed User
Longtime User
:sign0163:
Anyone have an idea for a endless spin box?
After the number 59 return to 1 to have a real spin like the big wheel in the show "price is right".
 
D

Deleted member 103

Guest
Hi birnesoft,

Thank you for your Spin-wheel.

I've improved a bit on your code to make it a little better.


Ciao,
Filippo
 

Attachments

  • wheel_v2.zip
    6.9 KB · Views: 730

JoanRPM

Active Member
Licensed User
Longtime User
Hello birnesoft.
I have made other improvements based on your example.
Just improve the graphic look and gives a bit more realism.
Thanks.
 

Attachments

  • wheel_jr1.zip
    7.9 KB · Views: 657

birnesoft

Active Member
Licensed User
Longtime User
Wheel V3

Hallo,

:sign0098:
JoanRPM looks great,
and thanks Filippo for optimize the code.

I made it now more flexible with arrays.



Good Idea with the dip is more easy. Thanks Erel!

Have anyone an idea to get the timer index on a better way?
And how can I make lines over the views.
I made it with __________ but it's not exact.


here is the whole src
thanx for optimize it!!!
 

Attachments

  • wheelv3.0.zip
    6.8 KB · Views: 720
Last edited:

birnesoft

Active Member
Licensed User
Longtime User
sure you have a long night!

:sign0163:
Anyone have an idea for a endless spin box?
After the number 59 return to 1 to have a real spin like the big wheel in the show "price is right".

you have to add 2 panels with the label list in the panel from the scrollview
if the position is on the end, position the first panel.top to the second panel bottom and change the position of the scrollview to the right place.

if you realize this for good handling I make a
Laola-Welle :wav: (Mexican wave)
for you
good luck!!!
 

birnesoft

Active Member
Licensed User
Longtime User
Yeah!!

I've added a transparent PNG with lines.

also for this I give an Laola :wav:

1000 Thanks,
now it looks perfect!

only the handling is still uncomfortable.

I think about a second timer array to make the moving more smooth.
 

moster67

Expert
Licensed User
Longtime User
:sign0098:

What a nice teamwork you have done!

This wheel-view is really nice and can add really nice looks to an app just like in the example Filippo posted.
 

Frankt

New Member
Licensed User
Longtime User
Thanks to everyone !

I think you can give a star to birnesoft for his contribution !
Nice team work !
:sign0142:
 
D

Deleted member 103

Guest
Hi birnesoft,

Idea:
for some cases it's maybe good to start the time again.
with the new version it is now possible, thanks for the tip.

Ciao,
Filippo
 

birnesoft

Active Member
Licensed User
Longtime User
Hi birnesoft,


with the new version it is now possible, thanks for the tip.

Ciao,
Filippo

Yes good. Now you can make a funny game with much people. who drives the longest time with an unicycle in 5 minutes :-D
It will also be good to make Names or photos with the camera before the start button.
Also an option to set all the conters on your choosen countdown time will be comfortable
and a bargraph behind the time to see visually how much time is left for each Person

I'm happy when you use my ideas, and I can use your tool for free.

thanks
Birne
 

birnesoft

Active Member
Licensed User
Longtime User
Cabatibility Update Spin Wheel 4.0

On Galaxy Note the white lines are going through the numbers.
(Using the actual version.)

Yes Erel told me too, I have to use dip's for positions to make it compatible.
I was long think about dip with variables.
Now I use this way

:sign0074: position= X*1dip

it works fine!!

In this version I've made it more flexible
and a better handling of the wheel
by setting the justify-time two times higher
now it' more relaxed

You can change this now more comfortable:

lh=45 'Labelheight
lOffSet=8 'label Center
timerCount=1500 'to Center the choosen Label

Good work with it!

>-D)Birne

PS.:has anybody an better idea to get the timer index??
 

Attachments

  • wheel_v40.zip
    7.3 KB · Views: 793
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…