I have my custom attr.xml
document in which I specified declare-styleable
:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="EditTextValidateablePreference">
<attr name="errorMessage" format="reference" />
</declare-styleable>
</resources>
Then in layout I set:
<com.xx.yy.EditTextValidateablePreference
...
ns:errorMessage="@string/validation_email_mail_server_invalid"
/>
And in EditTextValidateablePreference.class
I get it with:
String validatorErrorMessage = attrs.getAttributeValue(PREFERENCE_NS, "errorMessage");
validatorErrorMessage
has a value like: @2131099700
How can I get its integer value to use it with:
context.getResources().getString(messageId)
?
Thanks !