Js接口整合后续更改

This commit is contained in:
18401019693
2022-11-21 15:22:54 +08:00
parent 4cd1c22d01
commit a9d323354b
5 changed files with 34 additions and 21 deletions

View File

@@ -16,6 +16,8 @@ import android.view.View;
import android.view.ViewGroup;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
@@ -83,9 +85,6 @@ public class ZhuangBanActivity extends AbsActivity {
lt_title = (LinearLayout) findViewById(R.id.lt_title);
LinearLayout rootView = (LinearLayout) findViewById(com.yunbao.live.R.id.rootView);
if (getIntent().hasExtra("title")) {
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) rootView.getLayoutParams();
params.topMargin = DpUtil.dp2px(34);
rootView.setLayoutParams(params);
if (TextUtils.isEmpty(titleString)) {
lt_title.setVisibility(View.GONE);
} else {
@@ -129,7 +128,13 @@ public class ZhuangBanActivity extends AbsActivity {
} else {
setTitle(titleString);
}
int height = view.getMeasuredHeight();
Log.e("网页高度", height + "");
}
@Override
public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
super.onReceivedHttpError(view, request, errorResponse);
}
});
mWebView.setWebChromeClient(new WebChromeClient() {

View File

@@ -21,6 +21,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:background="@color/color_b14066"
android:layout_height="match_parent">
<ProgressBar
@@ -32,6 +33,7 @@
<LinearLayout
android:id="@+id/rootView"
android:background="@drawable/backgroud_custom_drawer_popup"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" />