M mywmshow Member Apr 3, 2023 #1 Sorry, I use the translator, hoping to clarify my question My app originally worked fine, but as long as a third-party full-screen advertisement was displayed, the app would be misaligned. What can I do to resolve this! My app is in Activity_ The setup code used in Create is as follows: Code: #if JAVA public void setToumingtitle() { Window window = getWindow(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); window.setStatusBarColor(Color.TRANSPARENT); View decorView = window.getDecorView(); int systemUiVisibility = decorView.getSystemUiVisibility(); systemUiVisibility &= ~View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; decorView.setSystemUiVisibility(systemUiVisibility); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); } } #end if Thank you very much for your help! Attachments 就是这样的启动开屏广告.jpg 31.6 KB · Views: 332 展示广告后高度错位.jpg 45.1 KB · Views: 451 不开启广告一切正常.jpg 47.4 KB · Views: 411
Sorry, I use the translator, hoping to clarify my question My app originally worked fine, but as long as a third-party full-screen advertisement was displayed, the app would be misaligned. What can I do to resolve this! My app is in Activity_ The setup code used in Create is as follows: Code: #if JAVA public void setToumingtitle() { Window window = getWindow(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); window.setStatusBarColor(Color.TRANSPARENT); View decorView = window.getDecorView(); int systemUiVisibility = decorView.getSystemUiVisibility(); systemUiVisibility &= ~View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; decorView.setSystemUiVisibility(systemUiVisibility); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); } } #end if Thank you very much for your help!
M mywmshow Member Apr 4, 2023 #2 Found the reason, is caused by 100% y to get to the height of the error Right to obtain highly code is as follows: Code: Dim jo As JavaObject jo.InitializeContext jo= jo.RunMethod("getResources", Null) jo=jo.RunMethod("getDisplayMetrics", Null) mainheight =jo.GetField("heightPixels") Upvote 0
Found the reason, is caused by 100% y to get to the height of the error Right to obtain highly code is as follows: Code: Dim jo As JavaObject jo.InitializeContext jo= jo.RunMethod("getResources", Null) jo=jo.RunMethod("getDisplayMetrics", Null) mainheight =jo.GetField("heightPixels")