View RSS Feed

Android Resource

  1. Referencing Application Resources

    by , 02-11-2012 at 11:53 AM
    All the application resources are compiled at build time and are stored in “res” project directory structure. These resources can also be used programmatically. Also they can refer to other resources in application. These application resources are accessed using class file R.java programmatically. Get the application’s resource object and call getResource() method to reference a resource in your activity class. After this call the appropriate method to access your desired resource.

    ...
    Categories
    Android Resource
  2. Edit a String Resource

    by , 02-11-2012 at 11:38 AM
    Open an Eclipse Android project and examine main.xml file. You will find that it has a TextView control layout. This TextView control interface simply displays a string. The string displayed in this case is defined in string resource called “@string/hello”.

    If you want to edit this string resource using string resource editor, follow these steps:

    • Double click strings.xml file in package explorer of Eclipse and it will open in the resource editor.
    • Select String
    ...