Sometimes I want to put a picture on the left side of EditText:
It is possible to add the following code to the EDITTEXT definition code in the XML layout file:
There are so many properties in TextView that you can draw drawable objects such as pictures at the end of the text. Android:drawablebottom: Output A drawable at the bottom of text, which can be pictures, styles, colors, etc. Android:drawableleft: Output A drawable on the left side of text, which can be pictures, styles, colors, etc. Android:drawableright: Output A drawable to the right of text, which can be pictures, styles, colors, etc. Android:drawabletop: Output A drawable directly above the text, which can be pictures, styles, colors, and so on. Android:drawablestart: Outputs a drawable at the beginning of text, which can be pictures, styles, colors, and so on. Android:drawableend: Outputs a drawable at the end of text, which can be pictures, styles, colors, and so on. Android:drawablepadding: Sets the spacing between text and drawable, which is used with Drawableleft, Drawableright, Drawabletop, Drawablebottom. So the question is, what's the difference between Drawablestart and drawableleft? We read a piece of text, all from left to right, so for us, start is a concept. But some cultures, like Arabs, are from right to left, and the two are diametrically opposed. Use start, end instead of left, right this is the recommended practice for Android's new RTL Layout support.
For more information, refer to:
http://blog.csdn.net/gao_chun/article/details/38284507
http://blog.csdn.net/csdn_ask/article/details/8640994
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android Advanced Tour------>android:drawableleft usage