title: Change TextView align programmatically
body: <p>My <code>RelativeLayout</code> is like this : </p>
  
  <p><code>ImageView</code>(arrow back) <code>TextView</code>(title) <code>ImageButton</code>(close button)</p>
  
  <ul>
  <li>the first <code>ImageView</code> is just an arrow</li>
  <li>the <code>TextView</code> can change and must stay between the two image</li>
  <li>the second <code>ImageView</code> is a close button</li>
  </ul>
  
  <p>I'm trying to change the visibility of the first image to GONE or VISIBLE</p>
  
  <p>For this I need to update the layout param of the <code>TextView</code>, but this is not working properly</p>
  
  <p>Here is my method : </p>
  
  <pre><code>private void setBackButton(boolean visible) {
          RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mTitle.getLayoutParams();
          if (visible) {
              mImageArrowBack.setVisibility(View.VISIBLE);
              params.addRule(RelativeLayout.RIGHT_OF, R.id.fragment_back);
          } else {
              mImageArrowBack.setVisibility(View.GONE);
              params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
          }
          params.addRule(RelativeLayout.LEFT_OF, R.id.fragment_close);
          mTitle.setLayoutParams(params);
      }
  </code></pre>
  
  <p>The arrow back is GONE and VISIBLE with no problem but the textview just stack on it. RIGHT_OF is not working.</p>
  
  <p>Any idea ?</p>
  
  <p>The complete layout : </p>
  
  <pre><code>&lt;RelativeLayout
      android:id="@+id/fragment_title_layout"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" &gt;
  
      &lt;ImageView
          android:id="@+id/fragment_back"
          android:layout_width="@dimen/button_favorite"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_centerVertical="true"
          android:src="@drawable/arrow_left" /&gt;
  
      &lt;TextView
          android:id="@+id/fragment_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_centerVertical="true"
          android:layout_toLeftOf="@+id/fragment_list_country_close"
          android:singleLine="true" /&gt;
  
      &lt;ImageButton
          android:id="@+id/fragment_close"
          android:layout_width="@dimen/button_favorite"
          android:layout_height="match_parent"
          android:layout_alignParentRight="true"
          android:layout_centerVertical="true"
          android:src="@drawable/close_btn" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>