title: Adding fragments to display a full screen layout
body: <p>I want to use fragments to display the Now playing screen whenever a user clicks on a song.I am having a main_activity layout that displays the list of songs and a item click listener.Now i want to open another layout which completely occupies the screen showing the current song that is being played.I think i can achieve this using a fragment but can't find a way to implement it.</p>
  
  <p>Here is my main_activity xml file</p>
  
  <pre><code>&lt;RelativeLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fitsSystemWindows="true"
  tools:context=".MainActivity"
  tools:showIn="@layout/activity_main"&gt;
  
  &lt;android.support.v7.widget.RecyclerView
      android:id="@+id/recycler_view"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:scrollbars="vertical"/&gt;``
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Now i want to replace this entire layout with now playing layout</p>
  
  <pre><code>&lt;LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:theme="@style/AppTheme.NoActionBar"&gt;
  
  &lt;ImageView
      android:layout_width="match_parent"
      android:layout_height="320dp"
      android:fitsSystemWindows="true"
      android:id="@+id/image"/&gt;
  </code></pre>
  
  <p></p>