我尝试在我的风格中强制使用“全屏”,如下所示:
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>我从我的活动中尝试了:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);我甚至尝试过这样做,当我按下“全屏显示”按钮时,会调用意图:
public static boolean goToFullScreen(final Activity activity) {
PackageManager packageManager = activity.getPackageManager();
try {
if ("huawei".equalsIgnoreCase(android.os.Build.MANUFACTURER)) {
final Intent huaweiIntent = new Intent();
huaweiIntent.setComponent(new ComponentName("com.android.systemui", "com.android.systemui.settings.HwChangeButtonActivity"));
if (huaweiIntent.resolveActivity(packageManager) != null) {
activity.startActivity(huaweiIntent);
return true;
}
}
} catch (Exception e) {
Utils.appendLog("goToBatterySettings exception:" + e.getMessage(), "E", Constants.OTHER);
}
return false;
}但我总是收到这个Screenshot
你知道怎么解决这个问题吗?
发布于 2018-04-06 22:12:22
将以下内容添加到<application>元素:
<meta-data android:name="android.max_aspect" android:value="2.1" />请参阅:https://android-developers.googleblog.com/2017/03/update-your-app-to-take-advantage-of.html
发布于 2018-03-21 18:43:00
尝试添加
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);https://stackoverflow.com/questions/49403776
复制相似问题