Groups
Groups
Sign in
Groups
Groups
android-platform
Conversations
About
Send feedback
Help
Internal attributes have unsuspected limitations
5 views
Skip to first unread message
jimdky
unread,
Oct 22, 2009, 1:08:42 PM
10/22/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-platform
I’ve tried to add a new attribute to the platform (by creating a
myattrs.xml in framework/base/core/res/res/values with the following
content:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="MyStyleable">
<attr name="someAttributeName" format="reference" />
</declare-styleable>
</resources>
It is then possible to assign this attribute a value from a theme or
style with
<item name="android: someAttributeName ">@style/SomeStyle</item>
and then access this value from the component that needs to be able to
read the value.
But, what doesn't work is to set this attribute from inside e.g. a
view.
<SomeStandardComponent
android:someAttributeName="@something"
android: someAttributeName cannot be resolved.
It seems like the only way to use this internal attribute is as a
value to the name attribute. Is there a way to get access to it in any
other way (like the '*' to be able to refer to internal resources)?
Adding it to public.xml isn’t an option.
Reply all
Reply to author
Forward
0 new messages