Code example for WebView: Displaying web pages

Methods: scrollTo, startAnimation, x 1

0
        prevPost = (ImageButton) v.findViewById(R.id.up);
        prevPost.setOnClickListener(new OnClickListener() {
 
            @Override 
            public void onClick(View v) {
                wv.loadUrl("javascript:Reader2.show_prev_item();");
                wv.loadUrl("javascript:Reader2.is_next_item();");
                wv.loadUrl("javascript:Reader2.is_prev_item();");
                fadeInWebView(); 
            } 
        }); 
 
        return v;
    } 
 
    private void fadeInWebView() { 
        AlphaAnimation fadeInAnimation = new AlphaAnimation(0.0f, 1.0f);
        fadeInAnimation.setDuration(600);
        wv.scrollTo(0, 0);
        wv.startAnimation(fadeInAnimation);
    } 
 
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        try { 
Stop searching for code, let great code find you!  Add Codota to your java IDE