1

I tried forcing "Full Screen" in my styles like this:

<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>

I tried from my activity:

getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);

I even tried this, which makes the intent that would get called when I press on the "full screen display" button :

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;
}

But I always get this Screenshot

Any ideea how to fix this?

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
rosu alin
  • 5,674
  • 11
  • 69
  • 150

2 Answers2

2

Add the following to the <application> element:

<meta-data android:name="android.max_aspect" android:value="2.1" />

See: https://android-developers.googleblog.com/2017/03/update-your-app-to-take-advantage-of.html

Zac
  • 984
  • 14
  • 25
0

Try to add

getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
Wurzelbert
  • 51
  • 8
  • 1
    nope, does not work, it looks the same. The app is "full screen" as in it has no status bar. But it doesn't cover the 18:9 ratio, just "full screen" as 16:9, having the black thing at the bottom – rosu alin Mar 21 '18 at 10:56