admin
2021-07-08 1764c1784a4cf1a6afd25fcf1a0eef6187a84218
app/src/main/java/com/tejia/lijin/app/ui/invite/ShareBrowserActivity.java
@@ -6,6 +6,7 @@
import android.content.ClipData;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.graphics.Bitmap;
import android.graphics.PixelFormat;
import android.net.Uri;
import android.os.Build;
@@ -105,6 +106,7 @@
    String mTitle;
    RebateJavaInterface javaInterface;
    RebateJavaInterfaceBS javaInterface1;
    private FrameLayout fl_full_video;
    String tag1 = "config/getWebConfig";
@@ -127,7 +129,7 @@
        setContentView(R.layout.browser_activity);
        AndroidBug5497Workaround.assistActivity(this);
        TopStatusSettings.setStatusViewAndDeepColor(this);
        String url = "http://192.168.3.122:8848/tejia-web/dsbridge-test.html";//getIntent().getStringExtra("url");
        String url = getIntent().getStringExtra("url");
        originalUrl = url;
        //是否允许粘贴板推荐
        String clipboradStr = getIntent().getStringExtra("clipboard");
@@ -152,7 +154,7 @@
        iv_right = findViewById(R.id.iv_top_bar_right);
        fl_webview = findViewById(R.id.fl_webview);
        fl_full_video = findViewById(R.id.fl_full_video);
        tv_top_bar_left2.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_web_close, 0, 0, 0);
        tv_top_bar_left.setOnClickListener(this);
        tv_top_bar_left2.setOnClickListener(this);
        iv_right.setOnClickListener(this);
@@ -217,8 +219,9 @@
        CustomNavigationJsObject customNavigation = new CustomNavigationJsObject(this);
        webview.addJavascriptInterface(customNavigation, "czb");//第二个参数czb不可更改,
        RebateJavaInterfaceBS javaInterface1 = new RebateJavaInterfaceBS(ShareBrowserActivity.this,
        javaInterface1 = new RebateJavaInterfaceBS(ShareBrowserActivity.this,
                tv_top_bar_middle, tv_top_bar_left2, new TextView(this), iv_right, webview, pd);
        javaInterface1.setGeneralBackCallback(this);//分享图片权限回调
        webview.addJavascriptObject(javaInterface1, "yestv");
        /***
@@ -375,6 +378,16 @@
                }
            }
            return response;
        }
        @Override
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            super.onPageStarted(view, url, favicon);
            if (view.canGoBack()) {
                tv_top_bar_left2.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_web_close, 0, 0, 0);
            } else {
                tv_top_bar_left2.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
            }
        }
    };
@@ -637,7 +650,6 @@
            webview.onResume();
            webview.loadUrl("javascript:yestvcallback.resume()");
        }
    }
    @Override
@@ -680,6 +692,12 @@
                if (mulList.size() == 2 && javaInterface.mList.size() > 0) {
                    mulList.addAll(0, javaInterface.mList);
                }
                if (mulList.size() == 2 && javaInterface1.mList.size() > 0) {
                    mulList.addAll(0, javaInterface1.mList);
                }
                if (mTopRightPopupWindow != null) {
                    v_cover_web.setVisibility(View.VISIBLE);
                    mTopRightPopupWindow.showAsDropDown(iv_right);
@@ -743,6 +761,9 @@
        if (javaInterface.mList.size() > 0)
            mulList.addAll(0, javaInterface.mList);
        if (javaInterface1.mList.size() > 0)
            mulList.addAll(0, javaInterface1.mList);
        shareFromAdapter = new WebTopRightAdapter(this, mulList);
        lv.setAdapter(shareFromAdapter);