<?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"
android:background="@drawable/ic_click"
android:minHeight="66dip" > <TextView
android:id="@+id/newstitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="11.3dip"
android:paddingRight="52dip"
android:paddingTop="14dip"
android:textColor="@color/black"
android:textSize="@dimen/middleTextSize"
android:textStyle="bold" >
</TextView> <TextView
android:id="@+id/newsaddTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/newstitle"
android:layout_below="@+id/newstitle"
android:paddingLeft="11.3dip"
android:paddingTop="8.6dip"
android:textColor="@color/black"
android:textSize="@dimen/smallTextSize" >
</TextView> <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5.3dip"
android:src="@drawable/ic_arrow" >
</ImageView></RelativeLayout>这个布局是@+id/newsaddTime本来应该在@+id/newstitle下面的,但实际显示的时候@+id/newsaddTime没有在@+id/newstitle的下面,而是默认在Relativelayout布局的顶端,感觉好奇怪,求大家帮忙看看
我自己测试了一下,确定没有你说的问题.
android:layout_alignLeft="@+id/newstitle"
android:layout_below="@+id/newstitle"
两个 +号 去掉试试
android:layout_alignLeft="@id/newstitle"
android:layout_below="@id/newstitle"
android:id="@+id/newsaddTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/newstitle"
android:layout_below="@+id/newstitle" //把加号去掉看看
android:paddingLeft="11.3dip"
android:paddingTop="8.6dip"
android:textColor="@color/black"
android:textSize="@dimen/smallTextSize" >
</TextView>
这句要去掉,这应该是默认在newstitle左边了