Проблема положения Android RelativeLayout - PullRequest
0 голосов
/ 20 июня 2011

Привет, у меня есть RelativeLayout ниже, и почему-то @ + id / tvPrice просто не отображаются.может кто-нибудь поможет?Спасибо.

Ссылка на изображение: http://bit.ly/izLhFO

макет xml:

<?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="?android:attr/listPreferredItemHeight"
    android:padding="6dip">
    <ImageView android:id="@+id/logo"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_alignParentTop="true"
        android:layout_alignParentBottom="true"
        android:layout_marginRight="6dip"
        android:src="@drawable/parkvilla" />

    <TextView android:layout_width="fill_parent"
        android:id="@+id/tvName"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:layout_alignWithParentIfMissing="true"
        android:gravity="center_vertical"
        android:text="Name" android:typeface="sans" 
        android:textSize="18sp" android:textStyle="bold"
        android:singleLine="true"
        android:layout_toRightOf="@+id/logo"/>

    <TextView android:id="@+id/tvPrice"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:text="Price" 
        android:textSize="13sp" 
        android:layout_above="@+id/tvSize"
        android:layout_toRightOf="@+id/logo"/>

    <TextView android:id="@+id/tvSize"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:text="Size" 
        android:textSize="13sp" 
        android:layout_toRightOf="@+id/logo"/>

</RelativeLayout>

1 Ответ

1 голос
/ 20 июня 2011

попробуйте добавить android: layout_below = "@ id / tvName" в tvPrice.

...