Wednesday, July 6, 2011

[android-developers] Custom View

Hello all,

I'm working on a custom view and I have some problems trying to define
some custom XML attributes. Here is part of my definitions:

<declare-styleable name="ViewUpDown">
<attr name="step" format="float" />
<attr name="value" format="float" />
<attr name="unit" format="string" />
<attr name="title" format="string" />
</declare-styleable>

<declare-styleable name="ViewSelect">
<attr name="items" format="string" />
<attr name="title" format="string" />
</declare-styleable>

1- Both have the attribute "title", they are distinct view so I think
The is no conflit but is. I get an error that says title has already
defined on the second title.

2- the attribute items on ViewSelect should be a string array? I tried
some options like: string-array or string[], but none worked. I been
looking for a list of valid options but without luck.

Any tip?

Thank you!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment