I’ve read through much of the Android documentation and I’ve yet to find any statement that says what an id value prefix of “@+id” means. I know what “@string” and variations of that mean, but not the variation with the “+”. Besides giving me the answer, can you show me where in the Android docs this is documented?
Share
The plus sign simply indicates that the ID should be created if it doesn’t exist.
It’s common practice to use
@+id/foowhen defining a new View in a layout, and then use@id/footo reference the View from another part of the layout (say, in a RelativeLayout hierarchy) orR.id.footo reference it from code.UPDATE: Docs are here: Declaring Layout – Attributes – ID