Closed Bug 1137283 Opened 9 years ago Closed 3 years ago

Centralize fullscreen interactions with FullScreenUtils or similar

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mcomella, Unassigned, Mentored)

References

Details

Android's fullscreen mode APIs suck - it's basically ORing together a bunch of flags [1]. These flags can be used inconsistently and put the UI into an inconsistent state. To make matters worse, the appropriate flags change across API levels.

We should centralize our access to fullscreen mode to make the API's use consistent. My initial thoughts go to...

enum VisualMode {
  NORMAL,
  LOW_PROFILE,
  FULLSCREEN,
  IMMERSIVE
}

class FullScreenUtils {
  public static void setFullScreenMode(VisualMode);
}

Before, we didn't combine this with our status bar tinting (bug 1056002) which resulted in an unpolished fullscreen experience - keep the potential to reland status bar tinting in the back of your head when completing this bug.

As a followup (and to complicate things), you can reduce jank when entering/exiting fullscreen by using the SYSTEM_UI_FLAG_LAYOUT_* flags on the Views within your application to lay them out as if fullscreen was already enabled. Followup?

[1]: https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility%28int%29
might be an good idea, I made the experience that setting window.fullScreen causes all sorts of funny interactions on Android.
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.