Android Resource

  1. @
    Note here the use of the '@' prefix to introduce a resource reference --
    the text following that is the name of a resource in the form of @[package:]type/name.
    In this case we didn't need to specify the package because we are referencing a resource in our own package. To reference a system resource, you would need to write:
  2. ?
    Note that this is very similar to a resource reference, except we are using an '?' prefix instead of '@'. When you use this markup, you are supplying the name of an attribute resource that will be looked up in the theme
    -- because the resource tool knows that an attribute resource is expected,
    you do not need to explicitly state the type (which would be ?android:attr/android:textDisabledColor).
  3. @ ?
    Other than using this resource identifier to find the value in the theme instead of raw resources, the name syntax is identical to the '@' format: ?[namespace:]type/name with the type here being optional.
  4. android defines (*.xml)
    frameworks\base\core\res\res\values
    attrs.xml , attrs_manifest.xml , public.xml , styles.xml , themes.xml
  5. You can get more information from SDK documments.
    Framework Topics | User Interface | Declaring Layout ....
  6. Reference
    1. android resources
    2. Resources and Internationalization
    3. android read xml
    4. understanding-android-themes-and-styles

留言