title: BottomNavigationVIew: Glitch that overwrites other layout
body: <p>I am using <code>BottomNavigationView</code> and I added <code>ListView</code> to my layout. After adding this <code>ListView</code>, the previous screen wont disappear and this new screen overwrites the previous screen. Does someone have an idea why this happens.</p>
  
  <pre><code>import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  
  import androidx.annotation.Nullable;
  import androidx.fragment.app.Fragment;
  
  import java.util.ArrayList;
  
  public class favaoritesFragment extends Fragment {
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState){
          View view = inflater.inflate(R.layout.fragment_favorites,container,false);
  
          String[] line =getResources().getStringArray(R.array.JR_East);
          ListView listView = (ListView)view.findViewById(R.id.listview);
          ArrayAdapter&lt;String&gt;adapter = new ArrayAdapter&lt;String&gt;(getActivity(),android.R.layout.simple_list_item_1,line);
          listView.setAdapter(adapter);
  
          return view;
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/zCpBS.png" rel="nofollow noreferrer">The issue.</a>
      
          </p>
  
  <pre><code>    &lt;ListView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/listview"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>