Tuesday, June 16, 2009

Using resources

When using resources the name used behind the @ sign is not the name of the resource file you will find that value in but the type of resource you are refering to. here xxxx is the type and yyyy is the name of the variable you're using. So your layout file would have something like this:

android:background="@xxxx/yyyy"

and your resource file (say mySuperRes.xml) would look something like that:

<xxxx name="yyyy">zzzz</xxxx>

No comments:

Post a Comment