I'm building an App in Android Studio.
I've built a simple Splash Screen to launch it while my MainActivity is loading and to give my App a more professional look. This is my XML code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/splashscreen"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/icon_verde_mela"/>
<TextView
android:id="@+id/developerTextView"
android:layout_width="match_parent"
android:textAlignment="center"
android:layout_height="wrap_content"
android:text="@string/developer"
android:layout_above="@id/designerTextView"
android:textColor="#9E9E9E"/>
<TextView
android:id="@+id/designerTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text="@string/designer"
android:layout_alignBottom="@id/splashscreen"
android:textColor="#9E9E9E"/>
</RelativeLayout>
The problem is that when I try to build my App I get the following error which seems to be caused by android:layout_above="@id/designerTextView"
:
No resource found that matches the given name (at 'layout_above' with value '@id/designerTextView').
I can't figure out what the problem is, since I've given the right id to my second TextView.
I'd appreciate some help.