As far as I know, the difference between @+id and @id is to create a resource id first time and reuse that already existed resource id in different places. For instance, If we have a Relative layout having two textViews one below another, we shall use @resourceId for the second textView which refers to the first TextView. The problem is, after updating the android studio to 3.0, @resourceId is not working anymore.To place second textView below the first one, I need to use @+firstTextViewId instead of @firstTextViewId. More specifically I need to use,
android:layout_below="@+id/totalQty"
instead of
android:layout_below="@id/totalQty"
Here is the code
<RelativeLayout
android:id="@+id/relBottomLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<TextView
android:id="@+id/totalQty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="abcdef"/>
<TextView
android:id="@+id/totalPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/totalQty"
android:text="saasdfdsdfsdf"/>
<TextView
android:id="@+id/totalNetPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/totalPrice"
android:text="abcdsadfsafddgfdgfgdef"
/>
</RelativeLayout>
Is it an understanding issue? or a problem from any end? Can anyone please explain?