title: How to set the height and width of relative layout in percentage
body: <p>I have a certain square space for my <code>LinearLayout</code>. Within this <code>LinearLayout</code> i have a <code>RelativeLayout</code> with height and width <code>100dp</code>. This <code>RelativeLayout</code> has a circular drawable shape. I want to set the height and width of <code>RelativeLayout</code> to be 60% of total space available for its parent <code>LinearLayout</code>. Is there a way to do this? </p>
  
  <p>This is the layout which i am designing 
  <a href="https://i.stack.imgur.com/YpV4F.jpg" rel="nofollow"><img src="https://i.stack.imgur.com/YpV4F.jpg" alt="enter image description here"></a></p>
  
  <p>This is my xml code snippet of one circular view</p>
  
  <pre><code> &lt;RelativeLayout
              android:id="@+id/rl_hatchback"
              android:layout_width="0dp"
              android:layout_height="match_parent"
              android:layout_weight="1"
  
              &gt;
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_centerInParent="true"
                  android:orientation="vertical"&gt;
  
              &lt;RelativeLayout
                  android:id="@+id/rl_hatchback_circle"
                  android:layout_width="100dp"
                  android:layout_height="100dp"
                  android:background="@drawable/circle_red"
  
                  &gt;
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:src="@drawable/ic_hatchback"
                      android:layout_centerInParent="true"
                      /&gt;
              &lt;/RelativeLayout&gt;
  
                  &lt;TextView
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_below="@+id/rl_hatchback_circle"
                      android:text="Hatchback"
                      style="@style/CircularTitle"
                      /&gt;
              &lt;/LinearLayout&gt;
  </code></pre>