Align text in text view
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.
精彩评论