title: Programmatically move a view Android
body: <p>I have an imageView that I want to move given a specific situation.</p>
  <p>Initially I have a Relative layout with two textViews and an imageview. The textViews are oriented with one above the other. The imageView is set</p>
  <pre><code>android:layout_below=&quot;@id/text_view1&quot;
  android:layout_toEndOf=&quot;@+id/text_view2&quot;.
  </code></pre>
  <p>In the logic text_view2 is removed when a specific condition is met. I want to programmatically move the imageView to the end of text_view1 when this condition is met. Essentially when text_view2 is removed, I want to set the imageView to</p>
  <pre><code>android:layout_toEndOf=&quot;@+id/text_view1&quot;
  </code></pre>
  <p>I don't believe setting X,Y,Z values is appropriate here because programmatically, I don't know where the  imageView will show up given different screen sizes, and densities. I just need it to move to the end of the first textView.</p>