Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't work with xml-selector #37

Closed
GoogleCodeExporter opened this issue Jul 24, 2015 · 1 comment
Closed

Don't work with xml-selector #37

GoogleCodeExporter opened this issue Jul 24, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
I want to assign svg-images for button via xml-selector.

In my project folder \res\drawable\ you can see: 
btn_play.xml  - this is a xml-selector
img_play.svg 
img_play_pressed.svg

The content of "btn_play.xml" :

<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE xml> <selector 
xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@drawable/img_play_pressed" android:state_focused="true" android:state_pressed="true"/> <item android:drawable="@drawable/img_play_pressed" android:state_focused="false" android:state_pressed="true"/> <item android:drawable="@drawable/img_play_pressed" android:state_focused="true"/> <item android:drawable="@drawable/img_play" android:state_focused="false" android:state_pressed="false"/> 

</selector>

It's works for png-images  but don't works for svg.
I expect that button will use assigned svg-images like png-images but in 
run-time I don't see any pictures.


I used the version 1.2 on android 4.x





Original issue reported on code.google.com by sopi...@gmail.com on 13 Jun 2014 at 9:06

@GoogleCodeExporter
Copy link
Author

Unfortunately, I don't think there is anything I can do about this. Android's 
drawable resource loader only knows about a few types and that doesn't include 
SVGs.

Currently there isn't a mechanism where I can extend the drawable system.  It 
has been requested (see 
https://code.google.com/p/android/issues/detail?id=66265&q=reporter%3Apaul.lebea
u&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars ).  Star that bug if 
you'd like to see that feature added.

Marking this "Won't Fix" - although it is really a "Can't Fix". :/

Original comment by paul.leb...@gmail.com on 13 Jun 2014 at 10:59

  • Changed state: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant