Many UI developers have questions about the meaning of android: id = "@ + id/my_button". The students carefully found that the official SDK is explained in this way,
Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
The at-symbol (@) at the beginning of the string indicates that the XML parser shoshould parse and expand the rest of the ID string and identify it as an ID resource. the plus-symbol (+) means that this is a new resource name that must be created and added to our resources (in the R. java file ). there are a number of other ID resources that are offered by the Android framework. when referencing an Android resource ID, you do not need the plus-symbol, but must add the android package namespace, like so:
Android: id = "@ android: id/empty"
Certificate ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
That is to say, the @ symbol should notify the xml to convert the string behind @ to the ID resource, and the + sign indicates that this is to create a new resource name and add it to the R. java file.
When you want to reference an existing resource, you can directly write it as @ android: id/empty
From: column of Octobershiner