title: Android - Placing one layout on top of another layout
body: <p>I am trying to place one layout in top of another. I can do it but there is a problem in a case. Let me describe it first :
  Here is my layout codes: </p>
  
  <pre><code>&lt;RelativeLayout&gt;        
  &lt;LinearLayout
          android:id="@+id/smallVideoRenderLayoutOutgoing"
          android:layout_width="120dp"
          android:layout_height="170dp"
          android:orientation="vertical"/&gt;
  
      &lt;LinearLayout
          android:id="@+id/largeVideoRenderLayoutOutgoing"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>There are other things but they are not necessary here . If i run code with these two view works fine. But if i setVisibility(GONE) for the "smallVideoRenderLayoutOutgoing" in my onCreate() or onResume() method on my Activity. It don't show at all. Though i can see the visibility of that "smallVideoRenderLayoutOutgoing" on my program and it show it is visible but i don't see it on my screen. I think it is overlapped by the "largeVideoRenderLayoutOutgoing" . What do you think and how can i solve this matter?</p>
  
  <p>Complete View heirarchy: 
  <a href="https://i.stack.imgur.com/JyCq6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JyCq6.png" alt="My complete view heirarchy"></a>
  Here is my code part:</p>
  
  <pre><code>    private LinearLayout smallVideoRenderLayoutOutgoing, largeVideoRenderLayoutOutgoing;
  private VideoCallImageRenderView smallPlayerGLView, largePlayerGLView;
  
   private void initVideoRenderer() {
      Constants.debugLog(TEST_TAG, "initVideoRenderer");
      Constants.debugLog(TAG, "initVideoRenderer");
      smallPlayerGLView = new VideoCallImageRenderView(this);
      largePlayerGLView = new VideoCallImageRenderView(this);
  
  
      VideoCallCamera.getInstance().startCamera();
      VideoCallCamera.getInstance().cameraCallBack(largePlayerGLView, this);
      isOwnSurfaceViewLarge = true;
  
      largeVideoRenderLayoutOutgoing.addView(largePlayerGLView);
      largeVideoRenderLayoutOutgoing.setOnClickListener(this);
  
      smallVideoRenderLayoutOutgoing.addView(smallPlayerGLView);
      smallVideoRenderLayoutOutgoing.setOnClickListener(this);
  
      smallVideoRenderLayoutOutgoing.setVisibility(View.GONE);
  
  }
  </code></pre>