Hi there,
I am trying to implement my own custom drawable to draw triangles
(this is an example) by extending ShapeDrawable.
Writing the component was OK.
Using the component in the code is OK.
I cam to a brick wall when trying to use the drawable only in XML.
Example of myDrawable.xml:
<com.mycompany.myproject.MyShapeDrawable>
<stroke android:width="1dp" android:color="#FFFFFFFF"/>
<solid android:color="#00000000" />
</ com.mycompany.myproject.MyShapeDrawable>
I have been crawling the web all day about this and it seems that this
cannot be done.
It is actually not possible ? (The code seem to tell it is not)
If it cannot be done this is disapointing as it almost defeat the
purpose of drawable outside what is provided by Google.
Furthermore, it is does not seem so massively complicated.
Looking at Drawable.createFromXmlInner(Resources r, XmlPullParser
parser, AttributeSet attrs), it feels fairly easy to use introspection
and check that "name" is or not a class from the project that extends
Drawable.
The same idea could be extended to ShapeDrawable when the name of the
shape in unknown.
Thanks for your help anyway.
Jean-Michel
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en