title: Why is my layout displayed wrongly on Xperia Z?
body: <p>I have a problem with layout rendering on Xperia Z. I have 2 buttons on layout which should take the size of its parent. Unfortunately, the phone can not do that. This is my layout code :</p>
  
  <pre><code>&lt;RelativeLayout&gt;
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;View
          android:layout_width="match_parent"
          android:layout_height="250dp"
          class="android.support.v4.view.ViewPager"
          android:id="@+id/View_Pager_Layout_View_Pager"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true"/&gt;
  
      &lt;ImageButton
          android:layout_width="50dp"
          android:layout_height="50dp"
          android:text="X"
          android:visibility="gone"
          android:layout_alignParentLeft="true"
          android:id="@+id/View_Pager_Layout_Exit_Image_Button_2"/&gt;
  
      &lt;ImageButton
          android:layout_width="50dp"
          android:layout_height="50dp"
          android:src="@android:drawable/ic_delete"
          android:scaleType="fitXY"
          android:background="@drawable/selector_button"
          android:visibility="gone"
          android:layout_alignParentRight="true"
          android:id="@+id/View_Pager_Layout_Exit_Image_Button_1"/&gt;
  
      &lt;RelativeLayout
          android:id="@+id/View_Pager_Layout_Arrow_Left"
          android:layout_width="50dp"
          android:layout_height="match_parent"
          android:layout_alignParentLeft="true"
          android:layout_below="@+id/View_Pager_Layout_Exit_Image_Button_2"/&gt;
  
      &lt;RelativeLayout
          android:layout_width="50dp"
          android:layout_height="match_parent"
          android:layout_alignParentRight="true"
          android:background="#FF0000"
          android:id="@+id/View_Pager_Layout_Arrow_Right"
          android:layout_below="@+id/View_Pager_Layout_Exit_Image_Button_1"/&gt;
  
      &lt;com.viewpagerindicator.CirclePageIndicator
          android:id="@+id/View_Pager_Layout_View_Pager_Indicator"
          android:layout_alignBottom="@+id/View_Pager_Layout_View_Pager"
          android:layout_width="match_parent"
          android:layout_height="30dp" android:layout_marginTop="10dp"
          android:layout_marginBottom="10dp"
          android:layout_toRightOf="@+id/View_Pager_Layout_Arrow_Left"
          android:layout_toLeftOf="@+id/View_Pager_Layout_Arrow_Right"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><code>RelativeLayout</code>s with ID <code>View_Pager_Layout_Arrow_Left</code> and <code>View_Pager_Layout_Arrow_Right</code> are displayed wrongly.</p>
  
  <p><img src="https://i.stack.imgur.com/ckrpe.jpg" alt="screenshot"></p>