question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BottomNavigationView] Adding extra padding

See original GitHub issue

Description: Whenever full-screen mode enabled by code icons are shrinking and after debugging I got to know that it’s adding extra padding at the bottom.

Expected behavior:

Screen Shot 2019-08-05 at 9 39 45 AM

photo_2019-08-05 09 32 42

Source code:

val flags = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                or View.SYSTEM_UI_FLAG_FULLSCREEN
                or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY)

        if (PreferenceUtil.getInstance().fullScreenMode) {
            window.decorView.systemUiVisibility = flags
        }

Android API version: Android 28

Material Library version: 1.1.0-alpha09

Device: Xioami Pocco f1

To help us triage faster, please check to make sure you are using the latest version of the library.

We also happily accept pull requests.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

9reactions
paolovalerdicommented, Aug 8, 2019

@h4h13 subclass BottomNavigationView and within the init block add the following line setOnApplyWindowInsetsListener(null) (You may need to setPadding(0) too)

1reaction
wcshicommented, Aug 8, 2019

@paolovalerdi @h4h13 please do not subclass bottomNavigationView just to do that. Have you read this comment? It may apply to your situation as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android BottomNavigationView has strange bottom padding
I had a similar problem, extra bottomPadding was getting added to BottomNavigationView after rotating from Fullscreen Landscape to Portrait ...
Read more >
How to remove extra space between the Navigation Bar and ...
There are two ways to resolve the issue. In both the cases we restrict the scroll view to leave extra margin for the...
Read more >
BottomNavigationView in Android - GeeksforGeeks
BottomNavigationView makes it easy for users to explore and switch between top-level views with a single tap. There should be a minimum of...
Read more >
Some tips to a better experience working with Android's ...
BottomNavigationView creates bottom navigation bars, making it easy to explore and switch between top-level content views with a single tap.
Read more >
BottomNavigationView - Android Developers
Represents a standard bottom navigation bar for application. It is an implementation of material design bottom navigation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found