The imageView is not getting right-aligned in this linearlayout (If it matters this LinearLayout is actually a row in a list).
But if i use a TextView (its commented in code below) instead of ImageView, it successfully gets right-aligned.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://ift.tt/nIICcg"
android:layout_width="fill_parent"
android:background="#FFFFAA"
android:orientation="horizontal" >
<TextView
android:id="@+id/txtTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Title"
android:textAppearance="?android:attr/textAppearanceMedium" />
<!--
<TextView
android:id="@+id/labelNext"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="> "
android:textSize="20sp"
android:textStyle="bold">
</TextView>
-->
<ImageView
android:id="@+id/iconNext"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_gravity="right"
android:layout_weight="1"
android:gravity="right"
android:src="@drawable/right_arrow" >
</ImageView>
</LinearLayout>
How do i get the imageView to the right-most edge of the LinearLayout row?
Aucun commentaire:
Enregistrer un commentaire