I have a horizontal linear layout with multiple text views. Layout has a width of fill_parent and a height of wrap_content. My problem is that when textual representations are longer than the allowed screen width of my device, it breaks the last textual representation on the right, and does not wrap it on a new line (this is my desired result). I thought wrap_content with height would solve this.
What can I do to make my linear layout with multiple text views wrap text views if they exceed the width of the parent?
Here is a snippet from my layout:
<LinearLayout
android:id="@+id/linearLayout20"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="3dip" >
<TextView android:layout_height="wrap_content" android:textColor="@color/black" android:text="Car Info: " android:id="@+id/textView023" android:layout_width="wrap_content" android:textStyle="bold" android:textSize="@dimen/item_main_text_size"></TextView>
<TextView android:layout_height="wrap_content" android:textColor="@color/black" android:text="2005" android:id="@+id/autorental_item_caryear" android:layout_width="wrap_content" android:textSize="@dimen/item_main_text_size"></TextView>
<TextView android:layout_height="wrap_content" android:textColor="@color/black" android:paddingLeft="3dip" android:text="Chevy" android:id="@+id/autorental_item_carmake" android:layout_width="wrap_content" android:textSize="@dimen/item_main_text_size"></TextView>
<TextView android:layout_height="wrap_content" android:textColor="@color/black" android:paddingLeft="3dip" android:text="Rio" android:id="@+id/autorental_item_carmodel" android:layout_width="wrap_content" android:textSize="@dimen/item_main_text_size"></TextView>
<TextView android:layout_height="wrap_content" android:textColor="@color/black" android:paddingLeft="3dip" android:text="-" android:id="@+id/textView2" android:paddingRight="3dip" android:layout_width="wrap_content" android:textSize="@dimen/item_main_text_size"></TextView>
<TextView android:layout_height="wrap_content" android:textColor="@color/black" android:paddingLeft="3dip" android:text="Red" android:id="@+id/autorental_item_carcolor" android:layout_width="wrap_content" android:textSize="@dimen/item_main_text_size"></TextView>
</LinearLayout>
With long text images, he does something like this:
Car Info: 2002 Chevrolet Silverado - Pu
rp
le
and I would like it to be something like this:
Car Info: 2002 Chevrolet Silverado -
Purple