From 9de86e545b786321b279a2842585cd72a7ed8bd4 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 12 Oct 2022 16:37:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=A4=BC=E7=89=A9UI=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=96=B0=E4=BA=BA=E7=AD=BE=E5=88=B0=E5=BC=B9?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/dialog/LiveHDDialogFragment.java | 11 +++++++++++ .../com/yunbao/live/views/LiveAudienceViewHolder.java | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java index 657f3d016..1832cf62f 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java @@ -189,6 +189,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment { }); } } + mWebView.setVisibility(View.INVISIBLE); } private long webHeight = 0; @@ -291,6 +292,16 @@ public class LiveHDDialogFragment extends AbsDialogFragment { @JavascriptInterface public void setHeight(String height, String width) { + if("0".equals(height)){ + return; + } + Handler handler=new Handler(Looper.getMainLooper()); + handler.post(()->{ + ViewGroup.LayoutParams params = mWebView.getLayoutParams(); + params.height=DpUtil.dp2px(Integer.parseInt(height)); + mWebView.setLayoutParams(params); + mWebView.setVisibility(View.VISIBLE); + }); } } diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index 4fe0164e6..41879b027 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -368,8 +368,8 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid; bundle.putString("url", url); bundle.putInt("show_type", 0); - bundle.putInt("height",DpUtil.dp2px(530)); - bundle.putBoolean("banScrollY",true); + bundle.putInt("height",DpUtil.dp2px(1)); + // bundle.putBoolean("banScrollY",true); LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment(); liveHDDialogFragment.setArguments(bundle); liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");