Skip to content Skip to sidebar Skip to footer

Animating On The Fling Event

package com.example.flingtry; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.graphics.drawable.AnimationDrawable; import andr

Solution 1:

suggestion is use onTouch instead of gesture listner

write cases for MotionEvent.ACTION_DOWN: MotionEvent.ACTION_UP: and MotionEvent.ACTION_MOVE

Once you detect the direction to move in MotionEvent.ACTION_MOVE use view.setTranslationX or view.setTranslationY depending on direction you want .... Rest what you want after certain drag/move you can write in MotionEvent.ACTION_UP with view

This is just instruction google it for sample code loads of code available

Post a Comment for "Animating On The Fling Event"