How to set the left background of an TextView
I have a text view. I would like to add a 'vertical line' on the le开发者_运维技巧ft side of the TextView to act as a separator.
Is there a way to do that?
Thank you.
You could try a custom Drawable
background. It would be easier, though, to just create a View
for your line:
<View android:layout_width="2dip" android:layout_height="wrap_content" />
and then position it to the left of the TextView
, either via a LinearLayout
or a RelativeLayout
.
精彩评论