title: Divide screen by percentage from top and sides
body: <p>I am trying to create a layout with image situated 20% size of screen from left, 20% size of screen from right and 30% size of screen from top. I can situate an image as 20% of the distance from the sides but don't know how to combine the percentages from the top and sides simultaneously. Now I'm using <strong>android:layout_marginTop</strong> to jump from the top edge. I want to use something what will make 30% free space of screen from top on any screen resolution. Please take a look on Fig.1. Thanks a lot for any help.</p>
  
  <p><img src="https://i.stack.imgur.com/kE7TI.png" alt="Fig. 1"></p>
  
  <p>XML Code:</p>
  
  <pre><code>&lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="horizontal"
      android:weightSum="100" &gt;
  
      &lt;TextView
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="20" /&gt;
  
      &lt;ImageView
          android:id="@+id/imageView4"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_gravity="top"
          android:layout_marginTop="100dp"
          android:layout_weight="60"
          android:src="@drawable/logo_line" /&gt;
  
      &lt;TextView
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="20" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>