views:

272

answers:

3

Hello,

Sorry, this's my first time to ask a question here. So, I don't have the permission to upload the image to describe. Never Mind. What I would like to make is a row of ListView like this. The block on the left is an icon.

Much appreciated if you could feedback the correct XML tags. Thanks.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------
|  |          some text     some text
|  |          some text     some text
-------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A: 

Check this CommonsWare's answer

dont duplicate the question. first search for question if you didnt get answer then ask.

Praveen Chandrasekaran
Sure, I've searched before ask. I didn't find one.
Jack101
thats fine. But i got this answer by search. if u get the correct answer accept it by click the tick mark left side of answer. then only people answers u eagerly. maintain your accept rate.
Praveen Chandrasekaran
A: 
<LinearLayout android:layout_height="wrap_content"
    android:layout_width="fill_parent">
    <ImageView android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:src="@drawable/image" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:text="Some text some text some text some text"
        android:layout_weight="1" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:text="Some text some text some text some text"
        android:layout_weight="1" />
</LinearLayout>
Jim Blackler
No, this is not. But thanks, I will make it clearly in my question.
Jack101
A: 

For the past few hours, I've finally found the solution by myself. Hopefully, this could do some help to others. This is my first contribution to this forum.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="60px">
    <ImageView
        android:layout_centerVertical="true"
        android:id="@+id/image"
        android:layout_height="32px"
        android:layout_width="32px"
        android:layout_marginLeft="20px" />
    <TableLayout
        android:layout_height="fill_parent"
        android:layout_marginRight="0px"
        android:layout_width="fill_parent"
        android:layout_marginLeft="62px">
        <TableRow
            android:minHeight="30px">
            <TableRow
                android:layout_width="fill_parent"
                android:minHeight="40px">
                <TextView
                    android:text="SOME TEXT"
                    android:layout_width="wrap_content"
                    android:ellipsize="end"
                    android:id="@+id/title"
                    android:textSize="10pt"
                    android:width="150px"
                    android:layout_gravity="fill_vertical"
                    android:gravity="bottom"
                    android:minHeight="40px"
                    android:textStyle="bold" />
                <TextView
                    android:text="99999"
                    android:id="@+id/amount"
                    android:textSize="10pt"
                    android:paddingRight="20px"
                    android:minHeight="40px"
                    android:gravity="bottom|right"
                    android:textStyle="bold"
                    android:width="108px" />
            </TableRow>
        </TableRow>
        <TableRow
            android:minHeight="20px">
            <TableRow
                android:layout_width="fill_parent">
                <TextView
                    android:text="SOME TEXT"
                    android:layout_width="wrap_content"
                    android:ellipsize="end"
                    android:id="@+id/description"
                    android:width="150px"
                    android:gravity="top"
                    android:layout_gravity="fill_vertical"
                    android:minHeight="20px" />
                <TextView
                    android:text="some text"
                    android:id="@+id/date"
                    android:paddingRight="20px"
                    android:minHeight="20px"
                    android:gravity="top|right"
                    android:width="108px" />
            </TableRow>
        </TableRow>
    </TableLayout>
</RelativeLayout>
Jack101
Jack101