How to create a gesture control rotating image for the user interface

I am trying to find the best way to make the image rotate along with the user's finger by dragging it left or right. I want to try and compare the speed at which the user's finger moves with the speed at which the rotation.

I have a basic setup for my application, with a menu and what I want to have, and that everything works fine on the emulator, I just don’t know how to approach this part.

I can encode all the logic that I need for my application, I just do not do the user interface design well, I have a photo in mind, I actually made a couple imitates it, I just can’t figure out how to do it in Android, and any help would be greatly appreciated.

+4
source share
1 answer

I suggest you first look:

http://developer.android.com/guide/topics/ui/ui-events.html

I'm not sure how to solve the problem with real rotation, but it seems that OpenGL can help you.

http://developer.android.com/guide/topics/graphics/opengl.html

or maybe a solution using custom animations?

http://developer.android.com/guide/topics/graphics/animation.html (=> http://developer.android.com/guide/topics/graphics/prop-animation.html )

Tell us how you solved it!

0
source

Source: https://habr.com/ru/post/1313145/


All Articles