문제

I'm creating an app that uses a disk to browse files and such, like this: http://dl.dropbox.com/u/8051037/disk_ab1.png

I want to make it be able to spin as the user turns it, and I know I need to use a RotateAnimation, but I can't figure out how to make it follow the finger.

도움이 되었습니까?

해결책

I think you should use a custom view, see this examle which rotates a ball: How can I use the animation framework inside the canvas?

then you can use motion event to control the angle of rotation: Android firing onTouch event for multiple ImageViews

Custom view can be transparent so you can combine it with other veiws in your layout.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top