android:drawableEnd - Set drawable to the end of the text, in TextView, in XML

Set drawable to the end of the text, in TextView, in XML

android:drawableEnd was added in API Level 14 
Related Method:
setCompoundDrawablesRelativeWithIntrinsicBounds - Add a Drawable to the End of Text, in a TextView, in Java

The drawable to be drawn to the end of the text.

1. Add a TextView.

2. Add a drawable named myImage.  

3. Ensure to change the minSDKVersion to 14, or greater.

4. In the main.xml file, add the below line

  <TextView
    .... 
      android:drawableEnd = "@drawable/myImage"
  />
 
5. Compile and run!

Related Articles
Resources:
developer.android.com/reference/android/widget/TextView.html#attr_android:drawableEnd
http://developer.android.com/reference/android/R.attr.html#drawableEnd