title: Remove Animation/Shifting mode from BottomNavigationView android
body: <p>i am building an application in which i have a BottomNavigationView. Everything works fine until i get to the Activity.</p>
  
  <p>The Navigation is this:</p>
  
  <p><a href="https://i.stack.imgur.com/OuTN9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/OuTN9.png" alt="enter image description here"></a></p>
  
  <p>The problem is that it has this default animation so it pushes the active element everytime higher than the rest.</p>
  
  <p>Another Example:</p>
  
  <p><a href="https://i.stack.imgur.com/MNqNf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MNqNf.png" alt="enter image description here"></a></p>
  
  <p>So my question is how to get rid of this default animation and every item is aligned when i switch between them?</p>
  
  <p>My code:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
      private BottomNavigationView bottomNavigationView;
      private Fragment fragment;
      private FragmentManager fragmentManager;
      private FragmentTransaction transaction;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          setupBottomBar();
      }
  
      private void setupBottomBar() {
          bottomNavigationView = (BottomNavigationView)findViewById(R.id.bottomBar);
          fragmentManager = getSupportFragmentManager();
          fragment = new CardDeckFragment();
          transaction = fragmentManager.beginTransaction();
          transaction.replace(R.id.activity_main, fragment).commit();
          bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
              @Override
              public boolean onNavigationItemSelected(@NonNull MenuItem item) {
                  switch (item.getItemId()){
                      case R.id.action_card_deck:{
                          Toast.makeText(MainActivity.this, "Card Deck Selected", Toast.LENGTH_SHORT).show();
                          fragment = new CardDeckFragment();
                          break;
                      }
                      case R.id.action_favorites:{
                          Toast.makeText(MainActivity.this, "Favorites Selected", Toast.LENGTH_SHORT).show();
                          fragment = new FavoritesFragment();
                          break;
                      }
                      case R.id.action_favorites_another:{
                          Toast.makeText(MainActivity.this, "Image Selected", Toast.LENGTH_SHORT).show();
                          fragment = new ImageFragment();
                          break;
                      }
                      case R.id.action_profile:{
                          Toast.makeText(MainActivity.this, "Profile Selected", Toast.LENGTH_SHORT).show();
                          fragment = new ProfileFragment();
                          break;
                      }
                      case R.id.action_menu:{
                          Toast.makeText(MainActivity.this, "Menu Selected", Toast.LENGTH_SHORT).show();
                          fragment = new MenuFragment();
                          break;
                      }
                  }
  
                  transaction = fragmentManager.beginTransaction();
                  transaction.replace(R.id.activity_main, fragment).commit();
                  return true;
              }
          });
  
  
  
      }
  }
  </code></pre>
  
  <p>and my layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/activity_main"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.realtimegaming.androidnative.testproject.MainActivity"&gt;
  
      &lt;android.support.design.widget.BottomNavigationView
          android:id="@+id/bottomBar"
          android:layout_alignParentBottom="true"
          android:background="@color/brown"
          android:layout_gravity="bottom"
          android:gravity="bottom"
          android:layout_marginTop="?attr/actionBarSize"
          app:itemBackground="@color/colorPrimary"
          app:menu="@menu/bottom_navigation_main"
          app:itemIconTint="@color/white"
          android:fitsSystemWindows="true"
          android:animateLayoutChanges="false"
          android:splitMotionEvents="false"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>