Liang
Liang

Reputation: 786

What does "add-resource" in Android resource xml file do?

I found that there are following statement in package/apps/UnifiedEmail package in android source code:

<add-resource name="RecipientEditTextViewStyle" type="style" />

What does this "add-resource" element mean?

The source code: https://github.com/CyanogenMod/android_packages_apps_UnifiedEmail/blob/cm-11.0/res/values/attrs.xml

Upvotes: 4

Views: 6014

Answers (1)

qazimusab
qazimusab

Reputation: 1051

<resources>
    <string name="app1_name">MyAppName</string>
</resources>

is the same thing as

<resources>
    <add-resource type="string" name="app1_name">MyAppName</add-resource>
</resources>

so

<add-resource name="RecipientEditTextViewStyle" type="style" />

is the same thing as

<style name = "RecipientEditTextViewStyle"/>

Upvotes: 4

Related Questions