layout : aligner à droite
Bonjour
Dans une "layout" qui permet de définir une barre de titre en haut, je souhaite placer une images, le titre de la page puis une deuxième image.
J'aimerai que cette deuxième image soit alignée à droite mais je n'y arrive pas.
J'utilise l'attribut : android:layout_alignParentRight="true"
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="40dip"
android:background="#ddd"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/action_icon"
android:src="@drawable/icon_task"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:scaleType="fitStart"
android:padding="4dip"
/>
<TextView
android:id="@+id/title"
android:text="@string/app_name"
android:layout_marginLeft="42dip"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:textSize="18dip"
android:textStyle="bold"
android:textColor="#FF555555"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:fadingEdgeLength="5mm"
android:paddingTop="10dip"
android:paddingRight="30dip"
/>
<ImageView
android:id="@+id/action_synchro"
android:src="@drawable/icon_sync"
android:layout_alignParentRight="true"
android:scaleType="center"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
/>
</LinearLayout> |
Une idée ?