I've been looking for an answer to this for a long long long time.
I have the following code:
<TableRow
android:id="#+id/tableRow106"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:visibility="gone"
android:background="#drawable/b02_light_bar">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="#+id/button35"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/b02_play_blue"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp"
>
<TextView
android:id="#+id/textView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:text="#string/interaction2"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/textView21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#41c4dd"
android:text="#string/interaction2cont"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
</LinearLayout>
</TableRow>
And my text in textview21 still gets cut off if it is too long.
Anyone know how to solve this?
I promise you, I tried everything!
I have copied your code and string and yes the problem is there..
I got one solution for you and that's
Remove android:padding="10dp" from TableRow tag and apply that in the LinearLayout right under the tableRow.
<TableRow
android:id="#+id/tableRow106"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:background="#drawable/b02_light_bar">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
>
<Button
android:id="#+id/button35"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/b02_play_blue"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp"
>
<TextView
android:id="#+id/textView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:text="#string/interaction2"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/textView21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#41c4dd"
android:text="#string/interaction2cont"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
</LinearLayout>
</TableRow>
use the attribute android:maxLines="3"
Change your textview to
<TextView
android:id="#+id/textView21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#41c4dd"
android:maxLines="3"
android:text="#string/interaction2cont"
android:textAppearance="?android:attr/textAppearanceSmall" />
Related
I write to show a video's name and mark.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left"
android:paddingBottom="7dp" >
<TextView
android:id="#+id/drama_mark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:includeFontPadding="false"
android:textColor="#ff9313"
android:textSize="16dp"
android:layout_marginLeft="8dp"
android:text="8.8"/>
<TextView
android:id="#+id/drama_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:gravity="left|end"
android:textColor="#ff323232"
android:textSize="16dp"
android:text="See you again"
android:layout_toLeftOf="#id/drama_mark" />
</RelativeLayout>
But it not use below android 16.Why it show in right?The video, name maybe two or more lines.I have try many times ,please help me.
Try this:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left"
android:paddingBottom="7dp" >
<TextView
android:id="#+id/drama_mark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="#ff9313"
android:layout_alignParentRight="true"
android:textSize="16dp"
android:layout_marginLeft="8dp"
android:text="8.8"/>
<TextView
android:id="#+id/drama_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:gravity="left|start"
android:textColor="#ff323232"
android:layout_alignParentLeft="true"
android:textSize="16dp"
android:layout_toLeftOf="#+id/drama_mark"
android:text="See you again gbfayufbafubsayfbas fysgafysaf fyasgfysuafas" />
</RelativeLayout>
Finally I use TableLayout to solve my question.
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="#dimen/distance"
android:paddingBottom="7dp"
android:shrinkColumns="0">
<TableRow>
<TextView
android:id="#+id/drama_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="#ff323232"
android:text="see you again"
android:textSize="16dp" />
<TextView
android:id="#+id/drama_mark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:includeFontPadding="false"
android:textColor="#ff9313"
android:textSize="#dimen/big_text"
android:layout_marginLeft="16dp"
android:text="8.8" />
</TableRow>
</TableLayout>
I'm stuck with a small problem in my listview. I tried several things like adding padding or changing the margins. But this didn't fix my problem.
Words keep getting cut of in the last rule.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:divider="?android:dividerVertical"
android:showDividers="middle"
android:dividerPadding="8dp">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/violationstitlebar"
>
<TextView
android:layout_width="#dimen/violation_list_col1"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="#string/resTaskviolPos"/>
<TextView
android:layout_width="#dimen/violation_list_col2"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="#string/resTaskviolDescriptionNLB"/>
<TextView
android:layout_width="#dimen/violation_list_col3"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
<TextView
android:layout_width="#dimen/violation_list_col4"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="#string/resTaskDescriptionFRB" />
<TextView
android:layout_width="#dimen/violation_list_col5"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
<TextView
android:layout_width="#dimen/violation_list_col6"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="#string/resTaskviolBLS"/>
<TextView
android:layout_width="#dimen/violation_list_col7"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="#string/resTaskviolRepeat"
/>
<TextView
android:layout_width="#dimen/violation_list_col8"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:divider="?android:dividerVertical"
android:showDividers="middle"
android:dividerPadding="8dp"
>
<TextView
android:layout_width="#dimen/violation_list_col1"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text=""
android:id="#+id/tvViolListPosition"
android:paddingLeft="10dp"
android:paddingBottom="10dp"/>
<TextView
android:layout_width="#dimen/violation_list_col2"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text=""
android:id="#+id/tvViolListDescription"
android:layout_weight="1"
android:maxLines="4"
/>
<ImageButton
android:layout_width="#dimen/violation_list_col3"
android:layout_height="50dp"
android:id="#+id/ibViolListEditDesc"
/>
<TextView
android:layout_width="#dimen/violation_list_col4"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text=""
android:id="#+id/tvViolListDescriptionFRB"
android:layout_weight="1"
/>
<ImageButton
android:layout_width="#dimen/violation_list_col5"
android:layout_height="50dp"
android:id="#+id/ibViolListEditDescFRB"
/>
<Spinner
android:layout_width="#dimen/violation_list_col6"
android:layout_height="wrap_content"
android:id="#+id/spViolListConclusion"
style="?android:dropDownSpinnerStyle"/>
<EditText
android:layout_width="#dimen/violation_list_col7"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/etViolListCounter"
android:inputType="number"
/>
<ImageButton
android:layout_width="#dimen/violation_list_col8"
android:layout_height="50dp"
android:id="#+id/ibViolListDelete"
/>
</LinearLayout>
</LinearLayout>
Does anyone have an idea how to fix this?
kind regards,
Tim
give some limitaion to charaters ,while adding the content of your NLB
maxlines, minimum lines
<EditText
android:id="#+id/AddressEdittext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/textView4"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="15dp"
android:background="#drawable/retangle_shape"
android:gravity="top|left"
android:hint="Type Here..."
android:inputType="textMultiLine"
android:lines="5"
android:maxLines="10"
android:minLines="5"
android:paddingBottom="5dp"
android:paddingLeft="#dimen/padding"
android:paddingRight="#dimen/padding"
android:paddingTop="5dp"
android:scrollbars="vertical" >
</EditText>
Try using this property also with some padding bottom:
android:includeFontPadding="false"
And:
android:baselineAligned="false"
I think you can solve it with layout_weight attribute.
More info on layout_weight can be found on:
http://ugia.io/2012/01/19/android-linearlayout-distribution-explained-weight-and-sizes/
http://developer.android.com/guide/topics/ui/layout/linear.html
I've a shop layout in which are three different sized images. To the right of them, there is text representing price. How can I align images and text under each other ? And put the middle of the screen between Image and text. Here is my layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" android:background="#drawable/podklad">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/lives"
android:focusable="false" android:background="#drawable/heart_image"
android:layout_below="#+id/money" android:layout_centerHorizontal="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="#+id/price1"
android:textSize="30sp" android:textColor="#ff000000"
android:layout_alignTop="#+id/lives" android:layout_toRightOf="#+id/lives"
android:layout_toEndOf="#+id/lives"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/money" android:layout_alignParentTop="true" android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textSize="40dp" android:textColor="#ff000000"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/monstertoprightcolored"
android:id="#+id/hardmode"
android:layout_centerVertical="true" android:layout_centerHorizontal="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="#+id/price2"
android:textSize="30dp"
android:textColor="#ff000000"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/hardmode"
android:layout_toEndOf="#+id/hardmode"
android:layout_above="#+id/price3"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/monsterbottomleftcolored"
android:id="#+id/reversedmode"
android:layout_alignParentBottom="true" android:layout_alignLeft="#+id/hardmode"
android:layout_alignStart="#+id/hardmode"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="#+id/price3"
android:textSize="30dp"
android:textColor="#ff000000"
android:layout_marginTop="26dp"
android:layout_below="#+id/hardmode"
android:layout_toRightOf="#+id/price2"
android:layout_toEndOf="#+id/price2"/>
A TableLayout might work better in this case. Here's a start to what your layout would look like:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="*">
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_span="2"
android:layout_gravity="right"
android:id="#+id/money"
android:textSize="40dp"
android:textColor="#ff000000"
tools:text="money" />
</TableRow>
<TableRow>
<ImageButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="#+id/lives"
android:focusable="false"
android:background="#drawable/heart_image"
/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="#+id/price1"
android:textSize="30sp"
android:textColor="#ff000000"
tools:text="price1" />
</TableRow>
<TableRow>
<ImageButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/monstertoprightcolored"
android:id="#+id/hardmode" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="#+id/price2"
android:textSize="30dp"
android:textColor="#ff000000"
tools:text="price2" />
</TableRow>
<TableRow>
<ImageButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/monsterbottomleftcolored"
android:id="#+id/reversedmode" />
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="#+id/price3"
android:textSize="30dp"
android:textColor="#ff000000"
android:layout_marginTop="26dp"
tools:text="price3" />
</TableRow>
</TableLayout>
Note that in order to "put the middle of the screen between Image and text", the two columns have to be equal in width. This is done by setting android:stretchColumns="*" in the TableLayout, and setting android:layout_width="0dp" and android:layout_weight="1" in the children of the TableRows.
See tablelayout - Set equal width of columns in table layout in Android for more info.
You can use linear layouts for this. Image and text can be split vertically in a linear layout. Each of this linear layout can be placed horizontally. Can you add a screenshot of how your layout should look for better understanding.
Here try this ,hope to help you, and i hope that i understand your problem correctly.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:background="#drawable/ic_launcher">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/lives"
android:focusable="false"
android:background="#drawable/ic_launcher"
android:layout_below="#+id/money"
android:layout_centerHorizontal="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="#+id/price1"
android:textSize="30sp"
android:text="Text"
android:textColor="#ff000000"
android:layout_alignTop="#+id/lives"
android:layout_toRightOf="#+id/lives"
android:layout_toEndOf="#+id/lives" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/money"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:textSize="40dp"
android:text="Text"
android:textColor="#ff000000" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/ic_launcher"
android:id="#+id/hardmode"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="#+id/price2"
android:textSize="30dp"
android:textColor="#ff000000"
android:text="Text"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/hardmode"
android:layout_toEndOf="#+id/hardmode"
android:layout_above="#+id/price3" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/ic_launcher"
android:id="#+id/reversedmode"
android:layout_alignParentBottom="true"
android:layout_alignLeft="#+id/hardmode"
android:layout_alignStart="#+id/hardmode" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="#+id/price3"
android:textSize="30dp"
android:textColor="#ff000000"
android:layout_marginTop="26dp"
android:layout_below="#+id/hardmode"
android:text="Text"
android:layout_toRightOf="#+id/price2"
android:layout_toEndOf="#+id/price2" />
</LinearLayout>
why does the gray box (transaction_amount) in the following layout doesn't expand to full space available even though the layout:height is match parent for it.
<TextView android:id="#+id/transaction_amount"
android:layout_width="120dp"
android:layout_height="match_parent"
android:textAppearance="#android:style/TextAppearance.DeviceDefault.Large"
android:textColor="#android:color/primary_text_light"
android:background="#drawable/rounded_rectangle"
tools:text="100"/>
<TextView
android:id="#+id/transaction_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/transaction_amount"
android:textAppearance="#android:style/TextAppearance.DeviceDefault.Medium"
android:textColor="#android:color/secondary_text_light"
tools:text="Mast Kalandar Dinner"/>
<TextView
android:id="#+id/shared_bw_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#id/transaction_name"
android:layout_toRightOf="#+id/transaction_amount"
android:layout_below="#id/transaction_name"
android:textAppearance="#android:style/TextAppearance.DeviceDefault.Small"
android:textColor="#android:color/secondary_text_light_nodisable"
android:text="Shared Between"/>
<TextView
android:id="#+id/shared_bw_csv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/shared_bw_label"
android:layout_alignBaseline="#id/shared_bw_label"
android:textAppearance="#android:style/TextAppearance.DeviceDefault.Small"
android:textColor="#android:color/secondary_text_light_nodisable"
tools:text="Ashu, Amol"/>
Try this layout instead, im sure it will help you.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="120dp"
android:layout_height="match_parent"
android:layout_marginRight="10dp"
android:background="#ffa"
android:orientation="vertical" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="100"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
</LinearLayout>
I have an xml layout that compiles fine but when I used the intent to change to the new view it force closes. I'm almost positive it has to do with my use of table and relative layouts. It's kind of a frankenstien monster of coding, haha. Please let me know if how I can remedy this force close problem. Also, before I had strickly table layout. With this layout it compiled and was fully functional, just not as a pretty. So the java should be fine (theoretically).
CODE:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout android:id="#+id/tableLayout1"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" android:background="#FFFFF0">
<RelativeLayout android:orientation="vertical" android:background="#drawable/banner"
android:layout_width="fill_parent" android:layout_height="50sp" android:gravity="center" >
</RelativeLayout>
<RelativeLayout android:id="#+id/tableTitle" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:background="#999">
<TextView android:id="#+id/ListingsTitle" android:text="Title: "
android:textColor="#000" android:textStyle="bold" android:textSize="20sp" />
<TextView android:id="#+id/sellingprice" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textColor="#000fff"
android:text="Price:" android:layout_below="#id/ListingsTitle" ></TextView>
<TextView android:id="#+id/mileage" android:layout_below="#id/ListingsTitle" android:layout_toRightOf="#id/sellingprice" android:layout_height="wrap_content" android:text="Mileage:" android:textColor="#000fff" android:layout_width="wrap_content"></TextView>
</RelativeLayout>
<RelativeLayout android:orientation="vertical" android:background="#FFFFF0"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<ImageButton android:id="#+id/PhotoGallerybtn"
android:src="#drawable/icon" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_alignParentLeft="true"></ImageButton>
<Button android:text="Email the Dealer" android:id="#+id/EmailDealerbtn" android:layout_alignParentLeft="true"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="#id/PhotoGallerybtn"></Button>
<Button android:text="Add to Favs" android:id="#+id/Favsbtn" android:layout_below="#id/PhotoGallerybtn"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="#id/EmailDealerbtn"></Button>
<Button android:text="Share" android:id="#+id/Sharebtn" android:mimeType="image/*"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="#id/PhotoGallerybtn" android:layout_toRightOf="#id/Favsbtn"></Button>
</RelativeLayout>
<TableRow android:id="#+id/tableRow4" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:background="#999">
<TextView android:id="#+id/textName" android:text="Details:"
android:textColor="#000" android:textStyle="bold" android:textSize="20sp" />
</TableRow>
<TextView android:id="#+id/bodystyle" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:textColor="#000"
android:text="Body Style:"></TextView>
<TextView android:id="#+id/color" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:textColor="#000"
android:text="Color:"></TextView>
<TextView android:id="#+id/doors" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:textColor="#000"
android:text="Doors:"></TextView>
<TextView android:id="#+id/engine" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:textColor="#000"
android:text="Engine:"></TextView>
<TextView android:id="#+id/vin" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:textColor="#000"
android:text="VIN:"></TextView>
</TableLayout>
You should add layout_width and layout_height fields to your TextView with #+id/ListingsTitle id:
<TextView android:id="#+id/ListingsTitle" android:text="Title: "
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000"
android:textStyle="bold"
android:textSize="20sp" />