setOnItemReselectedListener attempt and failure.

master
voussoir 2022-04-03 11:44:48 -07:00
parent e73023c892
commit 45de00b9c5
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,6 @@ import org.y20k.trackbook.helpers.AppThemeHelper
import org.y20k.trackbook.helpers.LogHelper
import org.y20k.trackbook.helpers.PreferencesHelper
/*
* MainActivity class
*/
@ -69,6 +68,10 @@ class MainActivity : AppCompatActivity() {
setContentView(R.layout.activity_main)
navHostFragment = supportFragmentManager.findFragmentById(R.id.main_container) as NavHostFragment
bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottom_navigation_view)
// Prevents the UI from flickering when clicking the tab that you are already on.
// Problem: clicking the Tracks nav while looking at a track should bring you back to the
// list of tracks.
// bottomNavigationView.setOnItemReselectedListener { null }
bottomNavigationView.setupWithNavController(navController = navHostFragment.navController)
// listen for navigation changes