title: android interface error ImageButton
body: <p>Hi i have an app that is a gallery of images.</p>
  
  <p>The problem is that, i have buttons to move between images on the center of the app and i want them at 75% of the margin of top.</p>
  
  <p>The question is : <strong>Can i put it on % of the screen instead of dp?</strong></p>
  
  <p>The error is that if i use <code>margin_bottom</code> it crashes.</p>
  
  <p>Here is my code</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:background="@color/color_fondo"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context=".MainActivity" &gt;
  
  &lt;ImageView
      android:id="@+id/barra"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentRight="true"
      android:layout_alignParentTop="true"
      android:scaleType="fitXY"a
      android:src="@drawable/cabecera" /&gt;
  
  &lt;ImageView
      android:id="@+id/img1"
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:layout_alignParentBottom="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentRight="true"
      android:layout_below="@+id/barra"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:scaleType="fitXY"
      android:src="@drawable/ic_launcher" /&gt;
  
  &lt;ProgressBar
      android:id="@+id/pb1"
      style="?android:attr/progressBarStyleLarge"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignTop="@+id/img1"
      android:layout_centerHorizontal="true"
      android:visibility="invisible" /&gt;
  
  &lt;ImageButton
      android:id="@+id/imgbtnshare1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_centerHorizontal="true"
      android:background="@null"
      android:paddingBottom="5dp"
      android:src="@drawable/compartir4" /&gt;
  
  &lt;ImageButton
      android:id="@+id/imgbtn2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_above="@+id/imgbtnshare1"
      android:layout_alignParentLeft="true"
      android:layout_marginBottom="100dp"
      android:background="@null"
      android:src="@drawable/izquierda42" /&gt;
  
  &lt;ImageButton
      android:id="@+id/imgbtn1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentRight="true"
      android:layout_alignTop="@+id/imgbtn2"
      android:background="@null"
      android:src="@drawable/derecha42" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>