Set drawable to the end of the text, in TextView, in XML
android:drawableEnd was added in API Level 14Related 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.
<TextView
....
android:drawableEnd = "@drawable/myImage"
/>
5. Compile and run!
Related Articles
- setCompoundDrawablesWithIntrinsicBounds - Add a Drawable Below a TextView
- Set an Image to Background of a TextView, using background
developer.android.com/reference/android/widget/TextView.html#attr_android:drawableEnd
http://developer.android.com/reference/android/R.attr.html#drawableEnd