Android Open Source - androidSamples Extended Web View






From Project

Back to project page androidSamples.

License

The source code is released under:

GNU General Public License

If you think the Android project androidSamples 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

package com.hainva.feedlynavigation;
//w  ww .  ja v  a2 s .  c o m
import android.content.Context;
import android.util.AttributeSet;
import android.webkit.WebView;

/**
 * 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

com.hainva.feedlynavigation.ExtendedWebView.java
com.hainva.feedlynavigation.FeedlyActivity.java
com.hainva.feedlynavigation.FeedlyViewPager.java
com.hainva.feedlynavigation.PageFragment.java
com.hainva.feedlynavigation.PagerAdapter.java