MrShi
2026-03-13 908f2f1eb97f76b16480955c4621a7cd47e14c32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.doumee.lib_coremodel.binding.viewadapter.webview;
 
 
import android.text.TextUtils;
import android.webkit.WebView;
 
import androidx.databinding.BindingAdapter;
 
/**
 * Created by goldze on 2017/6/18.
 */
public class ViewAdapter {
    @BindingAdapter({"render"})
    public static void loadHtml(WebView webView, final String html) {
        if (!TextUtils.isEmpty(html)) {
            webView.loadDataWithBaseURL(null, html, "text/html", "UTF-8", null);
        }
    }
}