Biyernes, Enero 25, 2013

The R File


The R File

The R file is the glue between the world of Java and the world of resources (see Exam-
ple 3-4). It is an automatically generated file, and as such, you never modify it. It is
recreated every time you change anything in the res directory, for example, when you
add an image or XML file.
You don’t need to look at this file much. We will use the data in it quite a bit, but we’ll
use Eclipse to help us refer to values stored in this file.

Example 3-4. gen/com/marakana/R.java


/* AUTO-GENERATED FILE. DO NOT MODIFY.
 *
 * This class was automatically generated by the
 * aapt tool from the resource data it found. It
 * should not be modified by hand.
 */
package com.marakana;
public final class R {
    public static final class attr {
    }
    public static final class drawable {
        public static final int icon=0x7f020000;
    }
    public static final class layout {
        public static final int main=0x7f030000;
    }
    public static final class string {
        public static final int app_name=0x7f040001;
        public static final int hello=0x7f040000;
    }
}

Walang komento:

Mag-post ng isang Komento