title: how to hide BottomNavigationView on android-navigation lib
body: <p>I am trying to use android-navigation lib in my APP and I do the things as the tutorial said. I just wanna use one single activity in my APP. I am confused about one question. some fragments that just don't want the BottomNavigationView, how can I hide it.
  here is my main_layout</p>
  <pre><code>&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
  android:orientation=&quot;vertical&quot; android:layout_width=&quot;match_parent&quot;
  android:layout_height=&quot;match_parent&quot;&gt;
  
      &lt;com.google.android.material.appbar.AppBarLayout
          android:id=&quot;@+id/appbar&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          app:elevation=&quot;0dp&quot;
          android:theme=&quot;@style/AppTheme.AppBarOverlay&quot;&gt;
  
          &lt;androidx.appcompat.widget.Toolbar
              android:id=&quot;@+id/toolbar&quot;
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:minHeight=&quot;?attr/actionBarSize&quot;
              android:fitsSystemWindows=&quot;true&quot;
              app:popupTheme=&quot;@style/AppTheme.PopupOverlay&quot; &gt;
  
          &lt;/androidx.appcompat.widget.Toolbar&gt;
  
      &lt;/com.google.android.material.appbar.AppBarLayout&gt;
  
      &lt;fragment
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;0dp&quot;
          android:layout_weight=&quot;1&quot;
          android:id=&quot;@+id/nav_host_fragment&quot;
          android:name=&quot;androidx.navigation.fragment.NavHostFragment&quot;
          app:defaultNavHost=&quot;true&quot;
          app:navGraph=&quot;@navigation/carkeeper_navigation&quot;/&gt;
  
  &lt;com.google.android.material.bottomnavigation.BottomNavigationView
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:id=&quot;@+id/menu_bottom_nav&quot;
      app:itemTextColor=&quot;@color/bottom_nav_title_color_selector&quot;
      app:itemIconSize=&quot;@dimen/x40&quot;
      app:menu=&quot;@menu/menu_main_bottom_nav&quot;
      app:labelVisibilityMode=&quot;labeled&quot;&gt;
  
  &lt;/com.google.android.material.bottomnavigation.BottomNavigationView&gt;
  </code></pre>
  
  <p>here is my mainActivity</p>
  <pre><code>class MainActivity : BaseActivity() {
  
  private lateinit var navController: NavController
  private lateinit var bottomNavigationView: BottomNavigationView
  private lateinit var appBarConfiguration: AppBarConfiguration
  
  override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      setContentView(R.layout.home_activity)
  
      navController = Navigation.findNavController(this, R.id.nav_host_fragment)
      appBarConfiguration = AppBarConfiguration(navController.graph, null)
      setSupportActionBar(findViewById(R.id.toolbar))
  
      bottomNavigationView = findViewById(R.id.menu_bottom_nav)
      bottomNavigationView.setupWithNavController(navController)
      bottomNavigationView.itemIconTintList = null
  }}
  </code></pre>
  <p>then the navigaton_graph</p>
  <pre><code>&lt;navigation xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
  xmlns:tools=&quot;http://schemas.android.com/tools&quot;
  android:id=&quot;@+id/carkeeper_navigation&quot;
  app:startDestination=&quot;@id/mainFragment&quot;&gt;
  
  &lt;fragment
      android:id=&quot;@+id/mainFragment&quot;
      android:name=&quot;com.saicfinance.carkeeper.func.main.MainFragment&quot;
      android:label=&quot;MainFragment&quot;
      tools:layout=&quot;@layout/home_fragment&quot;&gt;
  &lt;/fragment&gt;
  
  &lt;fragment
      android:id=&quot;@+id/mineFragment&quot;
      android:name=&quot;com.saicfinance.carkeeper.func.mine.MineFragment&quot;
      android:label=&quot;@string/mine_title&quot;
      tools:layout=&quot;@layout/mine_fragment&quot; &gt;
  
      &lt;action android:id=&quot;@+id/action_mine_fragment_to_setting_fragment&quot;
          app:destination=&quot;@id/settingFragment&quot;
          app:enterAnim=&quot;@anim/slide_in_right&quot;
          app:exitAnim=&quot;@anim/slide_out_left&quot;
          app:popEnterAnim=&quot;@anim/slide_in_left&quot;
          app:popExitAnim=&quot;@anim/slide_out_right&quot;/&gt;
  &lt;/fragment&gt;
  
  &lt;fragment
      android:id=&quot;@+id/settingFragment&quot;
      android:name=&quot;com.freddy.func.setting.SettingFragment&quot;
      android:label=&quot;setting_fragment&quot;
      tools:layout=&quot;@layout/setting_fragment&quot; /&gt;
  </code></pre>
  
  <p>I know I can set BottomNavigationView gone when navigating to settingFragment. then set BottomNavigationView visible when back to mine fragment. But that is strange. anyone who can help me, thanks in advance.</p>