J'ai une disposition relative qui ressemble à ceci: Comment créer une mise en page de type colonne pour les lignes ListView?
Voici le code:
<?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="fill_parent"
>
<TextView
android:id="@+id/nameText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip"
android:layout_alignParentLeft="true"
android:text="Symbol"
/>
<TextView
android:id="@+id/priceText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip"
android:layout_toRightOf="@+id/nameText"
android:gravity="right"
android:text="100"
/>
<TextView
android:id="@+id/changeText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dip"
android:layout_toRightOf="@+id/priceText"
android:gravity="right"
android:text="1.3"
/>
</RelativeLayout>
Comment puis-je obtenir le nom de l'entreprise pour aligner à côté du numéro 1.3?
comme toujours, rock solide réponse! est-ce que avoir un tablelayout au lieu d'une mise en page relative affecte la performance puisque c'est dans une listview? –
Hmm, j'ai peur de ne pas pouvoir vraiment aider beaucoup sur ce front. Je ne suis pas sûr de savoir comment cela affecterait les performances. Je ne pense pas que cela causerait beaucoup de différence. – kcoppock