开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜