title: Fragment Default View Wont Change
body: <p>i really need help. </p>
  
  <p>This is how my application looks like. I got two(2) fragments where the left side is for the buttons and for the right side is for my details.<br/><br/>
  The bigger fragment has a default display which i called splash. An image is viewed here, a bigger image that would take the height of the device.</p>
  
  <p>So my case is when i click/press button 1, it would display the fragment for that but the image is still present.<br/>
  My question now is, how to i get rid of the 'splash display'?</p>
  
  <p>Here is my code</p>
  
  <pre><code>/**
   * on main listener
   */
  @Override
  public void onMainListener(String whatPress){
      Fragment fr = null;
  
       if(whatPress.equals("button1"))
           fr = new FragmentOne();
       if(whatPress.equals("button2"))
           fr = new FragmentTwo();
       if(whatPress.equals("button3"))
           fr = new FragmentThree();
  
       FragmentManager fm = getFragmentManager();
       FragmentTransaction fragmentTransaction = fm.beginTransaction();
       fragmentTransaction.replace(R.id.detailFragment, fr, whatPress);
       fragmentTransaction.commit();
  }
  </code></pre>
  
  <p>The code above is the one handles which button is pressed.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="horizontal" &gt;
  
  &lt;fragment
      android:id="@+id/menuFragment"
      android:name="FragmentMenu"
      android:layout_width="0dp"
      android:layout_weight="1"
      android:layout_height="match_parent"
      class="com.mizsh.Fragment_Menu" /&gt;
  
  &lt;fragment
      android:id="@+id/detailFragment"
      android:name="com.mizsh.Fragment_Splash"
      android:layout_width="0dp"
      android:layout_weight="1"
      android:layout_height="match_parent" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The code above is my main.xml</p>
  
  <p><img src="https://i.stack.imgur.com/hcBr0.gif" alt="Figure 1"></p>