Thank you very much, Alvin...RelativeLayout solved my problem. Here
what i'm using now

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
        android:id="@+id/contacts_list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        xmlns:android="http://schemas.android.com/apk/res/android";
>
<ImageView
        android:id="@+id/icon"
        android:layout_width="48px"
        android:layout_height="48px"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
>
</ImageView>
<TextView
        android:id="@+id/name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_toRightOf="@id/icon"
>
</TextView>
<TextView
        android:id="@+id/number"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@id/icon"
        android:layout_alignLeft="@id/name"
>
</TextView>
<ImageView
        android:id="@+id/icon_presence"
        android:layout_width="19px"
        android:layout_height="19px"
        android:layout_alignBaseline="@id/name"
        android:layout_alignParentRight="true"
>
</ImageView>
<TextView
        android:id="@+id/presence"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        android:layout_alignBottom="@id/icon"
        android:layout_alignParentRight="true"
>
</TextView>
</RelativeLayout>


Best Regards

Breno


On Oct 30, 7:27 pm, Alvin Yates <[EMAIL PROTECTED]> wrote:
> If you only use one layout, you're telling Android to render 4 objects
> in a single row.  For your design (Using LinearLayout at least) you
> either need:
>
> <LinearLayout ..."horizontal">
>   <LinearLayout ..."vertical">  </>
>   <LinearLayout ..."vertical">  </>
> </>
>
> ... or...
>
> <LinearLayout ..."vertical">
>   <LinearLayout ..."horizontal">  </>
>   <LinearLayout ..."horizontal">  </>
> </>
>
> You may also be able to use a TableLayout or RelativeLayout if you're
> feeling frisky.  Also, be aware that images in Android seem to be
> fairly finicky for me at least.  If the image seems to distort your
> layout, you probably need to fix the canvas the image is drawn on,
> even if the background is transparent.
>
> On Oct 30, 4:24 am, Breno <[EMAIL PROTECTED]> wrote:
>
> > Hey every one, i want to to a layout like this
>
> > *************************************************
> > *#####   Text here                   text here  *
> > *#####   Text here         small icon here   *
> > *#####                                                  *
> > *************************************************
>
> > where ### is a image of 48x48. This will be used as a contact list,
> > with person photo, name, number, status and status icon. I did
> > something like that, but i'm not able to do like this. My xml is
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> > android"
> >                 android:orientation="horizontal"
> >         android:layout_width="fill_parent"
> >         android:layout_height="fill_parent">
>
> >     <ImageView android:id="@+id/icon"
> >         android:layout_width="48dip"
> >         android:layout_height="48dip" />
>
> >     <TextView android:id="@+id/name"
> >         android:layout_gravity="left|top"
> >         android:layout_width="wrap_content"
> >         android:layout_weight="0.0"
> >         android:layout_height="wrap_content"
> >         android:textStyle="bold" />
>
> >             <TextView android:id="@+id/number"
> >         android:layout_gravity="bottom|left"
> >         android:layout_width="wrap_content"
> >         android:layout_weight="0.0"
> >         android:layout_height="wrap_content" />
>
> >    <ImageView android:id="@+id/icon_presence"
> >         android:layout_gravity="right|bottom"
> >         android:layout_width="19dip"
> >         android:layout_height="19dip" />
>
> >      <TextView android:id="@+id/presence"
> >         android:layout_gravity="right|top"
> >         android:layout_width="wrap_content"
> >         android:layout_weight="0.0"
> >         android:layout_height="wrap_content" />
> > </LinearLayout>
>
> > Thanks a lot,
>
> > Breno
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to