반응형
 private final Property<WebView, Integer> WEBVIEW_SCROLL = new Property<WebView, Integer>(Integer.class, "") {
    @Override
    public Integer get(WebView object) {
        return object.getScrollY();
    }

    @Override
    public void set(WebView object, Integer value) {
        object.scrollTo(object.getScrollX(), value);
    }
};
ObjectAnimator.ofInt(mWebView, WEBVIEW_SCROLL, targetY).setDuration(duration).start();
반응형

+ Recent posts