Skip to content

建议把FrameLayout 用一个自定义FrameLayout 来实现, 可以让使用方继承 #38

Description

@budaowengd

` private ByWebView(Builder builder) {
this.activity = builder.mActivity;
this.mErrorTitle = builder.mErrorTitle;
this.mErrorLayoutId = builder.mErrorLayoutId;

    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);
    }`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions