title: My Bottom Navigation Bar Only Works When I Double Tap To Switch Fragments
body: <p>I have created a Bottom Navigation Bar that switches between 4 fragments. It works fine, however, I need to double tap a menu item in order to switch between fragments. This is not a feature I want nor do I know how it even came about.</p>
  
  <p>The tutorials I was following all require a single tap to switch between fragments so I am very confused.</p>
  
  <p>My MainActivity.java</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity
       {
  private FirebaseAuth auth;
  @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          auth = FirebaseAuth.getInstance();
          if (auth.getCurrentUser() == null) {
              startActivity(new Intent(MainActivity.this, Login_Page_Activity.class));
          }
          BottomNavigationView bottomnav = findViewById(R.id.bottom_navigation);
          bottomnav.setOnNavigationItemReselectedListener(navListener); //this
          getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container,
                  new explore_fragment()).commit();
      }
  
          private BottomNavigationView.OnNavigationItemReselectedListener navListener=
              new BottomNavigationView.OnNavigationItemReselectedListener() {
                  @Override
                  public void onNavigationItemReselected(@NonNull MenuItem menuItem) {
                      Fragment selectedFragment = null;
                      switch (menuItem.getItemId()){
                          case R.id.nav_explore:
                              selectedFragment = new explore_fragment();
                              break;
                          case R.id.nav_add:
                              selectedFragment = new add_events_fragment();
                              break;
                          case R.id.nav_events:
                              selectedFragment = new events_fragment();
                              break;
                          case R.id.nav_chat:
                              selectedFragment = new Chats_fragment();
                              break;
                      }
                      getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container,
                              selectedFragment).commit();
  
                  }
              };
  </code></pre>