0
If this is not the solution please reply to the post with XML code.
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/some_drawable"
android:text="some text"
android:layout_gravity="center"
android:gravity="center"
/>
Try using the properties below to align the hint and image to the center, I did a quick test here and it worked perfectly.
android:layout_gravity="center"
android:gravity="center"
android:layout_gravity Gravity specifies how a Component should be placed in its group of Cells.
Gravity Gravity for the view Associated with These Layoutparams.
I recommend you post the XML code so we can analyze it. I also recommend that you use the elements with the most logical content, in this case Textview with Text and Imageview with Images, because then you won’t have to do any tricks and you won’t have any problems.
– Edeson Bizerril