简体   繁体   中英

Android bottom navigation bar visibility

How can I make the bottom Navigation bar appear on selected activities and don't appear on others ? What lines should I add to make it happen

bottom Navigation bar is also a view in your some layout file, you could do like this:

    setContentView(R.layout.activity_main);
    BottomNavigationView bottomNavigationView = (BottomNavigationView)
                    findViewById(R.id.navigation);
    bottomNavigationView.setVisibility(View.INVISIBLE); //In activity you want to hide it
    bottomNavigationView.setVisibility(View.VISIBLE); //In activity you want to show it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM