Possible Duplicate:
Difference between “@id/” and “@+id/” in Android
When you create a layout XML file for Android applications, you usually declare the ID of each layout element as:
@+id/elementID
Don't you? I guess the "+" means that this element's ID is just created and therefore you need the plus, right?
But what do you have to do when you refer to a layout element before it is created? Do you refer to it with "+" and then create it without "+"? Simply put, is the following code correct (in a RelativeLayout container)?
<ImageButton
android:id="@+id/helpButton"
android:layout_toLeftOf="@+id/moreButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageButton
android:id="@id/moreButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" />