# Activity size is calculated incorrectly for full screen (immersive) apps in devices with notch/cutout

**URL:** <https://forum.juce.com/t/activity-size-is-calculated-incorrectly-for-full-screen-immersive-apps-in-devices-with-notch-cutout/32161>\
**Category:** Android\
**Created:** [March 7, 2019, 9:17pm UTC](https://forum.juce.com/t/activity-size-is-calculated-incorrectly-for-full-screen-immersive-apps-in-devices-with-notch-cutout/32161 "2019-03-07T21:17:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kauppila](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@kauppila](https://forum.juce.com/u/kauppila)\
**Post date:** [March 7, 2019, 9:17pm UTC](https://forum.juce.com/t/activity-size-is-calculated-incorrectly-for-full-screen-immersive-apps-in-devices-with-notch-cutout/32161/1 "2019-03-07T21:17:56Z")

</div>

Steps to repro:

- Use device with a notch/cutout, or simulate one using Android dev settings
- Create new GUI project for Android using Projucer
- Set @android:style/Theme.NoTitleBar.Fullscreen as theme
- Set main window as kiosk mode component

-\> The app is not filling the entire screen. The GUI gets drawn underneath the top cutout area as it should, but there’s a gap in the bottom of the screen. I assume Juce gets the screen dimensions from somewhere where cutout area is not taken into account.

---

<div class="post-metadata">

**Author:** ![kauppila](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@kauppila](https://forum.juce.com/u/kauppila)\
**Post date:** [March 7, 2019, 9:34pm UTC](https://forum.juce.com/t/activity-size-is-calculated-incorrectly-for-full-screen-immersive-apps-in-devices-with-notch-cutout/32161/2 "2019-03-07T21:34:00Z")

</div>

I got my fullscreen app working by forcing Display userArea to equal Display totalArea in juce\_android\_Windowing.cpp … but this isn’t a general purpose solution of course.

---

<div class="post-metadata">

**Author:** ![rackman](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@rackman](https://forum.juce.com/u/rackman)\
**Post date:** [March 9, 2020, 4:34am UTC](https://forum.juce.com/t/activity-size-is-calculated-incorrectly-for-full-screen-immersive-apps-in-devices-with-notch-cutout/32161/3 "2020-03-09T04:34:09Z")

</div>

Found another workaround after a few minutes of digging around…

In the `void setFullScreen (bool)` method of `juce_android_Windowing.cpp` replace:

```auto
Rectangle<int> r (shouldBeFullScreen ? Desktop::getInstance().getDisplays().getMainDisplay().userArea
                                     : lastNonFullscreenBounds);

```

with:

```auto
Rectangle<int> r (shouldNavBarsBeHidden(shouldBeFullScreen) ? Desktop::getInstance().getDisplays().getMainDisplay().totalArea
                                                            : shouldBeFullScreen ? Desktop::getInstance().getDisplays().getMainDisplay().userArea
                                                                                 : lastNonFullscreenBounds);

```

This approach seems to work with a non-kiosked component.

Has there been any investigation into this issue? I’d be happy to dive deeper and potentially submit a pull request.

---

<div class="post-metadata">

**Author:** ![skunk](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@skunk](https://forum.juce.com/u/skunk)\
**Post date:** [July 30, 2020, 2:33am UTC](https://forum.juce.com/t/activity-size-is-calculated-incorrectly-for-full-screen-immersive-apps-in-devices-with-notch-cutout/32161/4 "2020-07-30T02:33:00Z")

</div>

Juce6 _Demorunner_ still has this problem …

 ![android](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/a/a64e41a3d9a79173500317c346079c5b0a6063c3.jpeg)
