FrameLayout parentLayout = new FrameLayout(activity);
// 设置WebView
setWebView(builder.mCustomWebView);
parentLayout.addView(mWebView, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
// 进度条布局
handleWebProgress(builder, parentLayout);
if (builder.mIndex != -1) {
builder.mWebContainer.addView(parentLayout, builder.mIndex, builder.mLayoutParams);
} else {
builder.mWebContainer.addView(parentLayout, builder.mLayoutParams);
}`
` private ByWebView(Builder builder) {
this.activity = builder.mActivity;
this.mErrorTitle = builder.mErrorTitle;
this.mErrorLayoutId = builder.mErrorLayoutId;