Example usage for android.webkit WebView clearView

List of usage examples for android.webkit WebView clearView

Introduction

In this page you can find the example usage for android.webkit WebView clearView.

Prototype

@Deprecated
public void clearView() 

Source Link

Document

Clears this WebView so that onDraw() will draw nothing but white background, and onMeasure() will return 0 if MeasureSpec is not MeasureSpec.EXACTLY.

Usage

From source file:com.benefit.buy.library.http.query.AbstractAQuery.java

/**
 * Clear a view. Applies to ImageView, WebView, and TextView.
 * @return self/*from  w w w. j a  v  a 2s.c o  m*/
 */
public T clear() {
    if (view != null) {
        if (view instanceof ImageView) {
            ImageView iv = ((ImageView) view);
            iv.setImageBitmap(null);
            iv.setTag(Constants.TAG_URL, null);
        } else if (view instanceof WebView) {
            WebView wv = ((WebView) view);
            wv.stopLoading();
            wv.clearView();
            wv.setTag(Constants.TAG_URL, null);
        } else if (view instanceof TextView) {
            TextView tv = ((TextView) view);
            tv.setText("");
        }
    }
    return self();
}

From source file:com.androidquery.AQuery.java

/**
 * Clear a view. Applies to ImageView, WebView, and TextView.
 *
 * @return self/*  ww  w  .  j  ava 2 s .  co  m*/
 */
public AQuery clear() {

    if (view != null) {

        if (view instanceof ImageView) {
            ImageView iv = ((ImageView) view);
            iv.setImageBitmap(null);
            iv.setTag(AQuery.TAG_URL, null);
        } else if (view instanceof WebView) {
            WebView wv = ((WebView) view);
            wv.stopLoading();
            wv.clearView();
            wv.setTag(AQuery.TAG_URL, null);
        } else if (view instanceof TextView) {
            TextView tv = ((TextView) view);
            tv.setText("");
        }

    }

    return self();
}

From source file:com.androidquery.AbstractAQuery.java

/**
 * Clear a view. Applies to ImageView, WebView, and TextView.
 *
 * @return self/*w  w  w .  ja  v a2s  .c  o m*/
 */
public T clear() {

    if (view != null) {

        if (view instanceof ImageView) {
            ImageView iv = ((ImageView) view);
            iv.setImageBitmap(null);
            iv.setTag(AQuery.TAG_URL, null);
        } else if (view instanceof WebView) {
            WebView wv = ((WebView) view);
            wv.stopLoading();
            wv.clearView();
            wv.setTag(AQuery.TAG_URL, null);
        } else if (view instanceof TextView) {
            TextView tv = ((TextView) view);
            tv.setText("");
        }

    }

    return self();
}