Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add option to hide navigation bar on home screen #112

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

acanoe
Copy link

@acanoe acanoe commented Feb 22, 2025

To make the launcher more minimal on older Android version, I'd like to add the ability for user to hide the navigation bar on home screen. Toggling the "Use full screen" option does not hide the navigation bar, so I looked for another way to do it. I have tested the changes on my phones running Android 8.1 and Android 14.
This is my first ever PR, so any guidance or comment is appreciated.

@jrpie
Copy link
Owner

jrpie commented Feb 22, 2025

Many thanks for your contribution!

I think the wording of "use full screen" vs "hide navigation bar" is now somewhat confusing.

I'd suggest to
(a) rename "use full screen" to "hide status bar" or
(b) only show (and apply) the hide navigation bar setting when "use full screen" is enabled.

Any thoughts?

decorView.systemUiVisibility = uiOptions

// Add listener to hide the navigation bar
decorView.setOnSystemUiVisibilityChangeListener { visibility ->
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this listener is required. What might cause a visibility change that doesn't also trigger onWindowFocusChanged?
Also it seems strange to add a listener every time onWindowFocusChanged is called. If this listener is required, it should probably be moved to onCreate or onResume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants