title: Aligning ImageView to right of the layout android
body: <p>I have an layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="#FFFFFF"&gt;
  
      &lt;TextView android:id="@+id/groupname"
           android:paddingLeft="50px"
           android:textSize="16px"
           android:background="#FFFFFF"
           android:textColor="#000000"
           android:textStyle="normal"
           android:layout_width="wrap_content"
           android:layout_height="50px"/&gt;
       &lt;ImageView
               android:layout_width="match_parent"
               android:layout_height="wrap_content"
               android:layout_gravity="right"
               android:layout_marginRight="6dp"
               android:background="#ffffff" 
               android:src="@drawable/sort"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/8cDkt.png" alt="Rendering like this presently">
  <img src="https://i.stack.imgur.com/x3iTD.png" alt="I want to render like this"></p>
  
  <p>Rendering is happening now like in first image but I wanted to render like in second image fully right aligned. any help would be useful.</p>
  
  <p>Looking forward to your reply.
  thanks.</p>