see xiaomi devices. pretty good price/quality rati...
# random
d
see xiaomi devices. pretty good price/quality ratio
m
Xiaomi devices have some flaws. I was getting OOMs because of... imagine an ImageView of size 24x24dp. You've got vector drawable of size 1200x1200dp, because designer just sent you an SVG of such size. Nexus rasterizes it as 24x24dp, but Xiaomi rasterizes it as 1200x1200dp, and scales down then! Of cource, drawable of size 1x1dp in ImageView of size 24x24dp looked okay on Nexus, and was rasterized into several pixels and scaled up on Xiaomi.
k
I think your designer isn't sending it to you the right way. I've never gotten the svg to resize properly when they send that kind to me..
m
@kenkyee you may want to use the same icon in size of 24x24dp as a button, and in size of 1200x1200dp as a big image centered on the screen. That’s why they are ‘Scalable Vector Drawables’, they can be scaled easily.
k
That's what I thought too but when using them in imageviews, I had problems scaling down. Ended up needing the svgs in the equivalent do size that the images needed to be....I was setting the drawable into the imageviews in code though...
m
Which problems and on which devices?
k
Genymotion emulator. Even though I set the imageview to be e.g. 30dp, when I set the svg drawable via code, it drew it at the size inside the drawable...E.g. 1200px.
m
Which scaleType are you using? (ImageButton's default scaleType differs from ImageView's one.) Have you tried official Qemu & real devices?
k
This was a few months ago... Ended up getting the view into a custom view and drawing everything ☺️