开发者

How to set the left background of an TextView

开发者 https://www.devze.com 2022-12-27 05:32 出处:网络
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.

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

精彩评论

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