Example usage for android.webkit WebView setTag

List of usage examples for android.webkit WebView setTag

Introduction

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

Prototype

public void setTag(int key, final Object tag) 

Source Link

Document

Sets a tag associated with this view and a key.

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 ww  .  ja  va  2s  .  c om
 */
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 a v  a  2  s.c  o  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 .  j  a v a  2 s . c  om*/
 */
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();
}