title: Show activity's view overlay FrameLayout with Fragment
body: <p>I have the following activity:</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"
      tools:context="es.xxx.xxx.MainActivity"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="10dp"
          android:layout_marginRight="10dp"
          android:background="#CCFF0000"
          android:id="@+id/lyNetworkError"&gt;
              &lt;TextView
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="No hay conexión a internet"
                  android:textAlignment="center"/&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;FrameLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/container"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>In its FrameLayout the app will load other fragments.</p>
  
  <p>This is the onCreate code of activity</p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          Constants.setAppContext(this);
          setContentView(R.layout.activity_main);
  
          Log.d("LoadFragment", "1 "+ loadFragment);
          if (savedInstanceState == null) {
              getSupportFragmentManager().beginTransaction().replace(R.id.container, new MainFragment()).commit();
          }
          IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
          registerReceiver(networkStateReceiver, filter);
  
          fragmentManager = getSupportFragmentManager();
          lyNetworkError = (LinearLayout) findViewById(R.id.lyNetworkError);
  
      }
  </code></pre>
  
  <p>The problem is that LinearLayout (That contains TextView) doesn't show (is posible that fragment render over LinearLayout, because if I remove <code>getSupportFragmentManager().beginTransaction().replace(R.id.container, new MainFragment()).commit();</code> the LinearLayout appears)</p>
  
  <p>So, how can I show the LinarLayout over fragment (loaded inside FrameLayout)?</p>