<?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"
android:padding="20dp">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/content">
<ImageView
android:id="@+id/idcontentline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|top"
android:src="@drawable/line"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_centerHorizontal="true"/>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/idcontentline"
android:layout_centerHorizontal="true"
android:scrollbarStyle="insideInset"
android:scrollbars="vertical" >
<TextView
android:id="@+id/idcontenttext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="this is a sample" />
</ScrollView>
</RelativeLayout>
</RelativeLayout>
When i use android:layout_below=”@+id/idcontentline”,everything is correct and textview is below of imageview.But when use @id instead of @+id,it’s not work.
What’s wrong?
Clean the project several times, just it.