Android fills the text in textview on the left, image on the left and text on the right
•
Android
I have a textview, which contains the image on the left and the text on the right:
I want to create a space between the vertical line and the text
This is my code:
<TextView
android:id="@+id/locationDetailsTitleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/map_activity_location_details_dialog_title"
android:textColor="@color/actionbar_title_color"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:drawableLeft="@drawable/balloon_line" />
How can I do this?
Thank you in advance
UPDATE
This is me in balloon_ Drawable used in line:
resolvent:
Have you ever tried using Android: drawable padding?
Example: add 5dp padding between text and left drawable
<TextView
android:id="@+id/locationDetailsTitleTextView"
...
android:drawableLeft="@drawable/balloon_line"
android:drawablePadding="5dp"/>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码