Here is a simple code for animating a web view screen. But the problem is that the screen scrolls to the start of the animation. But I need to apply animation for the current screen ... how can I solve this?
here is my code snippet
if(e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) {
mWebView.startAnimation(AnimationUtils.loadAnimation(context, R.anim.page_slide_left_in));
mWebView.startAnimation(AnimationUtils.loadAnimation(context,R.anim.page_slide_left_out));
mWebView.scrollBy(mWebView.getWidth(),0);
}
source
share