Android: Count interval of MotionEvent.ACTION_MOVE?

I want my Views to move horizontally in tandem with our finger moving. Please imagine something like iOS home menu or Photos (the pre-installed galley app); if you slide your forefinger, the stuff on the screen also slide. I couldn't find the same function in Android libraries, so I just implemented it myself, but...

The animation isn't that smooth!

That's understandable, since the location values I get by

event.getRawX();

are a bit too rough, so my TranslateAnimation is also rough...

Is there any way I can change the interval of MotionEvent.ACTION_MOVE to get more fine location values? (Or alternatively, could I "blur" my TranslateAnimation?)

Answers


ViewPager may be what you are looking for.

Also see the Developers blog entry Horizontal View Swiping with ViewPager


Need Your Help

RadioButton inside grid column not showing selected values in Ext js 4.0

extjs

My code is here don't know what I'm doing wrong. my radio button is not group radio button its single button in separate column and if i select once i couldn't deselect it again

Read only textfield editable via inserted javascript?

javascript html forms google-chrome readonly

I have a form with a read only field for display/submit to the next page purposes.