I could not come up with a better name for this question, so please feel free to fix it if you can.
So here is my question. I decided to write a small application for myself, and along the way I also try to better learn Android Development. I know why there is a + (plus) sign in the android:id attribute, as this means "creating a new id resource". But I don't know why Android should put + in the ones used for links, for example below:
Here I have two buttons named StartButton and StopButton , and since they are new resources, android:id contains + :
<Button android:id="@+id/StartButton" android:layout_width="150dp" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/textView1" android:layout_marginTop="53dp" android:textSize="18dp" android:text="Start" android:onClick="StartButton_OnClick" /> <Button android:id="@+id/StopButton" android:layout_width="150dp" android:layout_height="wrap_content" android:layout_alignTop="@+id/StartButton" android:layout_toRightOf="@+id/StartButton" android:text="Stop" android:textSize="18dp" tools:context=".CallerBlockerActivity" android:onClick="StopButton_OnClick" />
But why android:layout_alignTop contains + puzzles, since id/StartButton is determined when @id/StopButton reaches it. Can someone explain the need for this syntax?
source share