I am using the following code
private GestureDetector.OnGestureListener mGestureListener = new GestureDetector.OnGestureListener() { private float lastDeltaValue; private static final int MIN_DISTANCE = 15; private static final int MIN_DISTANCE_Y = 25; @Override public boolean onDown(MotionEvent e) { lastDeltaValue = 0; return false; } @Override public void onShowPress(MotionEvent e) { } @Override public boolean onSingleTapUp(MotionEvent e) { return false; } @Override public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { float startingX = (int)e1.getRawX(); float startingY = (int)e1.getRawY(); float endingX = (int)e2.getRawX(); float endingY = (int)e2.getRawY(); float deltaX = startingX - endingX; float deltaY = startingY - endingY;
Originally GestureLayout Visibility GONE . After scrolling, its visibility will increase from 0.3 to 0.8. If I try to skip it, it increases the alpha of the View somewhere on the screen with some text (left scrolling), and this happens when scrolling correctly.
This code seems to work, but the low to high alpha animation is not standard.
Any help would be helpful
NOTE. I do not need animation. I want this to be based on a finger napkin.
java android eclipse android-studio android-animation
Muhammad Umar
source share