2010-06-26 5 views

Répondre

3

Il y a beaucoup de tutoriel et des questions à ce sujet.

pour ne citer que quelques-uns d'une recherche google:

Je n'ai pas testé, mais votre xml ligne doit être quelque chose comme ceci:

<?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="wrap_content"> 

    <TextView android:id="@+id/green_title" 
     android:textSize="25sp" 
     android:textColor="#00FF00" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentLeft="true" 
     android:text="Text1"/> 

    <TextView android:id="@+id/sub_title" 
     android:textSize="15sp" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_below="@id/green_title" 
     android:text="Text2"/> 

    <ImageView android:id="@+id/image" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:src="@drawable/image" 
     android:layout_alignParentRight="true" 
     android:layout_below="@id/green_title"/> 
    </RelativeLayout> 
+0

voulez l'image aligné à droite :( – Sand

+0

@Sand: Vérifiez le premier lien. Il parle d'un fichier row.xml. Là vous ferez votre propre vue pour chaque rangée. Utilisez un RelativeLayout ou un LinearLayout et placez l'image sur la droite et c'est tout. – Macarse

+0

mais comment aligner l'image sur la droite? – Sand