I
I
idg_dima2013-10-05 11:14:21
Java
idg_dima, 2013-10-05 11:14:21

Implementing scrolling in a mobile application on your own?

I have an Android application that renders several buttons through OpenGL. Only one button is placed on the screen, the rest are on the right. An analogue is the choice of the world in Angry Birds. It is necessary, actually, to implement scrolling. I implemented it, but the algorithm, frankly, is a crutch. More precisely, he calculates the speed when the finger is lifted off (to continue the animation, since one of the buttons must always be in the center of the screen). Could you please give me some tutorials on this topic to do things like people do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mik_os, 2013-10-05
@mik_os

developer.android.com/reference/android/view/VelocityTracker.html
developer.android.com/reference/android/view/GestureDetector.html
developer.android.com/reference/android/view/GestureDetector.SimpleOnGestureListener.html#onFling( android.view.MotionEvent, android.view.MotionEvent, float, float)

I
Ilya Yusupov, 2013-10-05
@x4fab

In addition, I can advise you to look into the source code, for example, ScrollView 'a.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question