简体   繁体   English

Android制作卷轴的最佳方式似乎是旋转

[英]Android best way to make reel appear to spin

I'm making a simple fruit machine / slot machine for Android. 我正在为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/ 我在网上关注了一个教程: 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. 我需要做的就是找到如何将它放入我的relativelayout,具有正确的大小取决于手机,所以它适合我的布局而不是当前在其中的静态图像。

Thanks, 谢谢,

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. 有一个非常好的第三方开源项目叫做Android Wheel ,几乎可以为你创建一个老虎机。 And if you want to customise it, it's under an Apache licence, so no issues there. 如果你想定制它,它是在Apache许可下,所以没有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM