I am working on an app in which i have to spin a object like in "Spin The Bottle" app.
Rotation has been started using R开发者_如何转开发otateAnimation but problem is that is stops every time at same position. I want to stop it randomly. Please help me.
Thanks in Advance
How are you calling the function?
The documentation here: http://developer.android.com/reference/android/view/animation/RotateAnimation.html
shows a few different constructors... one taking a start angle and a stop angle. All you need to do is use a random number function to generate the stop angle and pass that in:
    RotateAnimation(0, randomNumber);
Of course if you want it to start from the previous position you just need to keep that number in a separate variable and pass it in as the first parameter.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论