优化PK排位赛固定高度
This commit is contained in:
parent
72f7e00dd5
commit
1eff58aca1
@ -60,6 +60,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
private String roomId;
|
private String roomId;
|
||||||
private DialogInterface.OnShowListener listener;
|
private DialogInterface.OnShowListener listener;
|
||||||
private TextView htmlError;
|
private TextView htmlError;
|
||||||
|
private boolean isSetHeight =false;
|
||||||
|
|
||||||
public LiveHDDialogFragment() {
|
public LiveHDDialogFragment() {
|
||||||
|
|
||||||
@ -173,6 +174,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
findViewById(R.id.title_laout).setVisibility(View.VISIBLE);
|
findViewById(R.id.title_laout).setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
if (bundle.getInt("height", -1) != -1) {
|
if (bundle.getInt("height", -1) != -1) {
|
||||||
|
isSetHeight =true;
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, bundle.getInt("height", -1));
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, bundle.getInt("height", -1));
|
||||||
mWebView.setLayoutParams(params);
|
mWebView.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
@ -193,7 +195,9 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageFinished(WebView view, String url) {
|
public void onPageFinished(WebView view, String url) {
|
||||||
view.loadUrl("javascript:window.androidObject.setHeight(document.body.clientHeight,document.body.clientWidth,true)");
|
if(!isSetHeight) {
|
||||||
|
view.loadUrl("javascript:window.androidObject.setHeight(document.body.clientHeight,document.body.clientWidth,true)");
|
||||||
|
}
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onShow(LiveHDDialogFragment.this.getDialog());
|
listener.onShow(LiveHDDialogFragment.this.getDialog());
|
||||||
listener = null;
|
listener = null;
|
||||||
|
@ -1666,7 +1666,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
url += "uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
url += "uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||||
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
|
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
|
||||||
bundle.putString("url", url);
|
bundle.putString("url", url);
|
||||||
//bundle.putInt("height", DpUtil.dp2px(600));
|
bundle.putInt("height",DpUtil.dp2px(500));
|
||||||
bundle.putInt("show_type", 0);
|
bundle.putInt("show_type", 0);
|
||||||
bundle.putString("roomId", mLiveUid);
|
bundle.putString("roomId", mLiveUid);
|
||||||
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
||||||
|
Loading…
Reference in New Issue
Block a user