How to Align an ImageView to the Right in a View

android:layout_alignParentRight was added in API Level 1
If true, makes the right edge of this view match the right edge of the parent. Accommodates right margin.
Must be a boolean value, either "true" or "false".

1. In your main.xml file, add a RelativeLayout.

2. Add an ImageView  to the main.xml file.

3. Add the below line between the <ImageView> tags. This will move the ImageView to the Right of the view within its parent.

android:layout_alignParentRight = "true"

4. Compile and run!

Next Recommended Article: android:gravity - Move Text inside a EditText (center, top, bottom, right, left, and more)

Resources:
developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentRight