Pixate / pixate-freestyle-android

Pixate Freestyle for Android
Apache License 2.0
254 stars 55 forks source link

Not showing some SVG formats #24

Open fidoboy opened 10 years ago

fidoboy commented 10 years ago

When i use some SVG formats or I use svgmin to minimize SVG files, they are not being displayed on android but works fine on iOS. It's a bug in Pixate or there is some SVG especifications that I should consider when using these kind of images?

Shalom commented 10 years ago

Hi fidoboy, It's definitely possible that we have some differences between the iOS and the Android SVG support. I believe that at this point, the iOS version can support a bit more advanced specifications in the SVG format. Have you tried the same SVG in its non-minimized version? Thanks

fidoboy commented 10 years ago

yes, the non minimized version works fine… Another problem i have with SVG is that i can't resize them when using with buttons in navigation bar (action bar)

fidoboy commented 10 years ago

i've also discovered that if the width and height attributes are missing in the SVG header, they doesn't work on Android but work fine on iOS

Shalom commented 10 years ago

Have you taken a look at the ActionBar demo - https://github.com/Pixate/pixate-freestyle-android/tree/master/samples/PixateFreestyleActionBarDemo In some cases, you may need to force a background-size.

fidoboy commented 10 years ago

Yes, i'm using background-size and it has no effect on image dimensions but in the image sharpness

Shalom commented 10 years ago

Yes, probably because the View's dimension is strictly bound by the ActionBar implementation.

fidoboy commented 10 years ago

ok, i suppose that i could use a background padding to reduce a bit the image, problem is, how can i set color of that padding? cause right now it shows a white background and not the action bar background color :(

Shalom commented 10 years ago

Just a thought :) But you can also edit some padding into your SVG. That should be transparent.

fidoboy commented 10 years ago

yes, your are right but if i do it that way, the images on iOS will be displayed smaller than they should be, cause i'm sharing the same SVG files between both platforms...