title: Multiple fragments in one tab of bottom navigation
body: <p>In my app i have 5 fragments. I use bottom navigation to manage them. But in first fragment i have recyclerview and when i click on recycler item i need to open second fragment in this tab (first tab).</p>
  
  <pre><code>public class ActivityBottom extends AppCompatActivity {
  
      final Fragment fragment1 = new FragmentMarker();
      final Fragment fragment2 = new FragmentBookmark();
      final Fragment fragment3 = new FragmentMap();
      final Fragment fragment4 = new FragmentNotification();
      final Fragment fragment5 = new FragmentAccount();
      final FragmentManager fragmentManager = getSupportFragmentManager();
      Fragment active = fragment1;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
          setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
          setContentView(R.layout.activity_main);
  
          BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_navigation);
          bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
          BottomHelper.disableShiftMode(bottomNavigationView);
  
          fragmentManager.beginTransaction().add(R.id.frame_container, fragment5, "5").hide(fragment5).commit();
          fragmentManager.beginTransaction().add(R.id.frame_container, fragment4, "4").hide(fragment4).commit();
          fragmentManager.beginTransaction().add(R.id.frame_container, fragment3, "3").hide(fragment3).commit();
          fragmentManager.beginTransaction().add(R.id.frame_container, fragment2, "2").hide(fragment2).commit();
          fragmentManager.beginTransaction().add(R.id.frame_container, fragment1, "1").commit();
      }
  
  
      private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
              = new BottomNavigationView.OnNavigationItemSelectedListener() {
          @Override
          public boolean onNavigationItemSelected(@NonNull MenuItem item) {
              Fragment fragment = null;
              switch (item.getItemId()) {
                  case R.id.nav_home:
                      fragmentManager.beginTransaction().hide(active).show(fragment1).commit();
                      active = fragment1;
                      return true;
                  case R.id.nav_bookmark:
                      fragmentManager.beginTransaction().hide(active).show(fragment2).commit();
                      active = fragment2;
                      return true;
                  case R.id.nav_blog:
                      fragmentManager.beginTransaction().hide(active).show(fragment3).commit();
                      active = fragment3;
                      return true;
                  case R.id.nav_notification:
                      fragmentManager.beginTransaction().hide(active).show(fragment4).commit();
                      active = fragment4;
                      return true;
                  case R.id.nav_account:
                      fragmentManager.beginTransaction().hide(active).show(fragment5).commit();
                      active = fragment5;
                      return true;
              }
            return false;
          }
      };
  }
  </code></pre>
  
  <p>Right now when i am trying to open second fragment he opens above all tabs.</p>
  
  <p>This is how do I open a second fragment</p>
  
  <pre><code>@Override
          public void onItemClick(Marker marker) {
              MarkerDetailsFragment markerDetailsFragment = new MarkerDetailsFragment();
              Bundle bundle = new Bundle();
              bundle.putParcelable("marker", marker);
              markerDetailsFragment.setArguments(bundle);
              getActivity().getSupportFragmentManager().beginTransaction()
                      .replace(R.id.frame_container, markerDetailsFragment, "MarkerDetailsFragment")
                      .addToBackStack(null)
                      .commit();
          }
  </code></pre>