Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android best way to make reel appear to spin

I'm making a simple fruit machine / slot machine for Android. I'm thinking how I can make the "reel" appear to spin, then gradually stop.

The way I was thinking was to have a surround, and then have images randomly generated at the top, moving down the screen. Only part of the image would be visible.

Any help with ideas, or how it can be done, would be absolutely fantastic!

I followed a tutorial online here: http://mobile.tutsplus.com/tutorials/android/android-sdk-achieving-movement/

This showed me how to extend surface view and create a class with movement. All I need to be able to do is find how to put that into my relativelayout, with the correct size depending on the phone, so it fits into my layout instead of the static image which currently is in it's place.

Thanks,

like image 786
ThePerson Avatar asked Feb 09 '12 21:02

ThePerson


1 Answers

There's a very good 3rd party open source project called Android Wheel that pretty much does everything involved in creating a slot machine for you. And if you want to customise it, it's under an Apache licence, so no issues there.

like image 199
Stev_k Avatar answered Sep 27 '22 18:09

Stev_k