I have a ScrollView
that contains a TextView
, and a Spinner
. I'd like to place the ScrollView
directly above the Spinner
. My code is giving me an error when I try to run the project, however:
Error:(11, 31) No resource found that matches the given name (at 'layout_above' with value '@id/tense_spinner').
Here is my code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.wsandhu.conjugation.LearnActivity$PlaceholderFragment">
<ScrollView
android:id="@+id/scrollview"
android:layout_above="@id/tense_spinner"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView android:text="Placeholder text"
android:id="@+id/learn_textview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</ScrollView>
<Spinner
android:id="@+id/tense_spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>
Any idea?