开发者

Align text in text view

开发者 https://www.devze.com 2023-01-30 11:17 出处:网络
I have two text viewfirst one aligns on the left of parent and contains a single word. th开发者_C百科e backgroung color of first is different from second one.The next textview contains

I have two text view first one aligns on the left of parent and contains a single word. th开发者_C百科e backgroung color of first is different from second one.The next textview contains two lines. I need to display the first line of text to the right of first text view and the second line of text to the bottom of the first text view.

the view is like this 'Date' is the word and rest is the text in second text view.

Date This my new car. Thank u all

for your advice.

Thanks in advance.


You should use RelativeLayout as a parent and then for second text box use attribute android:layout_toRightof[first text view].

In the first text view, specify width="wrap_content" so that single word doesn't fill your parent.

This should work.

0

精彩评论

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

关注公众号