Android Open Source - VerticalViewPager Extended Web View






From Project

Back to project page VerticalViewPager.

License

The source code is released under:

MIT License

If you think the Android project VerticalViewPager listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

import android.content.Context;
import android.util.AttributeSet;
import android.webkit.WebView;
// w  w w.  java2  s . c  o  m
/**
 * Created with IntelliJ IDEA.
 * User: sash0k
 * Date: 07.06.13
 * Time: 11:15
 * ???? ???????????? ????????????? ???????? ?? Android 2.x
 * see http://stackoverflow.com/a/9925980
 */
public class ExtendedWebView extends WebView {
    public ExtendedWebView(Context context) {
        super(context);
    }

    public ExtendedWebView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public boolean canScrollVertical(int direction) {
        final int offset = computeVerticalScrollOffset();
        final int range = computeVerticalScrollRange() - computeVerticalScrollExtent();
        if (range == 0) return false;
        else return (direction < 0) ? (offset > 0) : (offset < range - 1);
    }
}




Java Source Code List

.ExtendedWebView.java
.PagerAdapter.java
.VerticalViewPager.java