1、获取状态栏高度传给H5(广场模块)

This commit is contained in:
老皮 2024-09-14 09:42:31 +08:00
parent 7cb89035d8
commit 86902a8f9b

View File

@ -186,8 +186,10 @@ public class MainHomeCommunityFragment extends BaseFragment {
view.loadUrl(jsUrl); view.loadUrl(jsUrl);
view.reload(); view.reload();
} }
int starHeight = UIUtils.getStatusBarHeight(mContext);
view.postDelayed(new Runnable(){ Log.e("网页高度 3 ", starHeight + "");
view.loadUrl("javascript:setTop(" + starHeight + ")");
/* view.postDelayed(new Runnable(){
@Override @Override
public void run() { public void run() {
int height = view.getMeasuredHeight(); int height = view.getMeasuredHeight();
@ -196,7 +198,7 @@ public class MainHomeCommunityFragment extends BaseFragment {
Log.e("网页高度", height + ""); Log.e("网页高度", height + "");
view.loadUrl("javascript:setTop(" + 200 + ")"); view.loadUrl("javascript:setTop(" + 200 + ")");
} }
},3000); },3000);*/
} }
}); });