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");