What's does the " @ " caracter mean?

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

What's does the " @ " caracter mean?

Postby LW » Wed Jan 02, 2008 2:52 am

I thought the " @ " only concerned the id when you write for example : id="@+id/widget24", but actually it appears almost everywhere like : android:text="@string/table_layout_1_star" or, android:icon="@drawable/icon".
Could someone help me, i don't get the meaning of this thing.

thx
LW
Junior Developer
Junior Developer
 
Posts: 11
Joined: Mon Dec 31, 2007 2:05 pm

Top

Postby Rolaveric » Wed Jan 02, 2008 10:11 am

Someone else might have a more precise definition.
But the way I see it, it's put at the beginning of an XML entry to say "This is not an ordinary string, this is actually pointing to a file/memory address/ID/etc." to whatever is reading it.
Look at me still talking when there's science to do
Rolaveric
Freshman
Freshman
 
Posts: 9
Joined: Mon Nov 26, 2007 8:56 am
Location: Sydney, Australia

Postby LW » Wed Jan 02, 2008 10:51 am

I just want to know basically the meaning of @, and what you're saying seems to be true now that i think about it.
thank you.
LW
Junior Developer
Junior Developer
 
Posts: 11
Joined: Mon Dec 31, 2007 2:05 pm

Postby plusminus » Thu Jan 03, 2008 12:59 pm

Hello LW,

using the @ like this:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. android:icon="@drawable/icon"
Parsed in 0.000 seconds, using GeSHi 1.0.8.4

makes it a "relative"-Pointer. What means that you are pointing to another resource within this project :!:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests