How to Set a Drawable below Text, in a TextView, in XML
android:drawableBottom was added in API Level 1Related Method: setCompoundDrawablesWithIntrinsicBounds - Add a Drawable Below a TextView
The drawable to be drawn below the text.
1. Add a TextView.
2. Add a drawable named myImage.
3. In the main.xml file, add the below line
<TextView
....
android:drawableBottom = "@drawable/myImage"
/>
4. Compile and run!
Related Articles
- setCompoundDrawablesWithIntrinsicBounds - Add a Drawable Below a TextView
- Set an Image to Background of a TextView, using background
http://developer.android.com/reference/android/widget/TextView.html#attr_android:drawableBottom
http://developer.android.com/reference/android/R.attr.html#drawableBottom