title: Alignment of two Relative layout within a main relative layout
body: <pre><code>    &lt;RelativeLayout
          android:id="@+id/OtherWeatherInfo_main"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginBottom="@dimen/margin_space"
          android:layout_marginLeft="@dimen/margin_space"
          android:layout_marginRight="@dimen/margin_space" &gt;
  
          &lt;RelativeLayout
              android:id="@+id/OtherWeatherInfo"
              android:layout_width="@dimen/weather_space"
              android:layout_height="wrap_content"
              android:layout_centerVertical="true"
              android:gravity="center_vertical"
              android:layout_alignParentLeft="true"
              android:background="@drawable/rect_block" &gt;
  
              &lt;LinearLayout
                  android:id="@+id/humidityLayout"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:orientation="vertical" &gt;
  
                  &lt;TextView
                      android:id="@+id/humidityTitle"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="@string/str_humidity"
                      android:textSize="@dimen/weather_size"
                      android:textStyle="bold" &gt;
                  &lt;/TextView&gt;
  
                  &lt;TextView
                      android:id="@+id/humidityValue"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="@string/str_no_data"
                      android:textColor="@color/color_white"
                      android:textStyle="bold" &gt;
                  &lt;/TextView&gt;
              &lt;/LinearLayout&gt;
             &lt;/RelativeLayout&gt;
  
              &lt;RelativeLayout
                  android:id="@+id/OtherWeatherInfo2"
                  android:layout_width="@dimen/weather_space"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="10dp"
                  android:layout_alignParentRight="true"
                  android:layout_centerVertical="true"
                  android:gravity="center_vertical"
                  android:layout_toRightOf="@+id/OtherWeatherInfo"
                  android:background="@drawable/rect_block" &gt;
  
                  &lt;LinearLayout
                      android:id="@+id/visiLayout"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="vertical" &gt;
  
                      &lt;TextView
                          android:id="@+id/visiTitle"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_gravity="center_horizontal"
                          android:text="@string/str_visi"
                          android:textSize="@dimen/weather_size"
                          android:textStyle="bold" /&gt;
  
                      &lt;TextView
                          android:id="@+id/visiValue"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_gravity="center_horizontal"
                          android:text="@string/str_no_data"
                          android:textColor="@color/color_white"
                          android:textStyle="bold" /&gt;
                  &lt;/LinearLayout&gt;
  
  
          &lt;/RelativeLayout&gt;
      &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>The above code is written by me to achieve the following figure:<img src="https://i.stack.imgur.com/wxqra.jpg" alt="enter image description here">.But what I am achieving is <strong>this</strong>:<img src="https://i.stack.imgur.com/cehJ7.png" alt="enter image description here"> or <strong>this</strong>:<img src="https://i.stack.imgur.com/ifz8a.png" alt="enter image description here">.</p>
  
  <p>I have absolutely no clue about what is the mistake I am doing here??I am just using a main relative layout 
  <strong>OtherWeatherInfo_main</strong> and within that I am embedding two relative layouts to represent the two weather attributes. <strong>@dimen/weather_space</strong> is 145 dp.I am unable to align the two relative layout within the main layout equally.Any help will be appreciated.</p>