修复粉丝徽章帮助按钮点击没反应问题

This commit is contained in:
zlzw 2023-04-24 17:00:43 +08:00
parent 5a5164f72b
commit 59508a45cb

View File

@ -7,7 +7,9 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.provider.MediaStore;
import androidx.annotation.RequiresApi;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
@ -41,6 +43,7 @@ public class MedalQuestionWebViewActivity extends AbsActivity {
private final int CHOOSE_ANDROID_5 = 200;//Android 5.0以上的
private ValueCallback<Uri> mValueCallback;
private ValueCallback<Uri[]> mValueCallback2;
@Override
protected int getLayoutId() {
return R.layout.activity_webview;
@ -50,14 +53,13 @@ public class MedalQuestionWebViewActivity extends AbsActivity {
protected void main() {
String url = getIntent().getStringExtra(Constants.URL);
L.e("H5---2>" + url);
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
// LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
mWebView = new WebView(mContext);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
params.topMargin = DpUtil.dp2px(1);
mWebView.setLayoutParams(params);
mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
rootView.addView(mWebView);
mWebView = findViewById(R.id.webView);
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
// params.topMargin = DpUtil.dp2px(1);
// mWebView.setLayoutParams(params);
// mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
mWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
@ -123,6 +125,7 @@ public class MedalQuestionWebViewActivity extends AbsActivity {
}
mWebView.loadUrl(url);
}
private void openImageChooserActivity(ValueCallback<Uri> valueCallback) {
mValueCallback = valueCallback;
Intent intent = new Intent();