ceryle / RadioRealButton

A custom radio button for Android API 12+
Apache License 2.0
259 stars 73 forks source link

Another bug with vectors #23

Open Alex293 opened 7 years ago

Alex293 commented 7 years ago

Hi, great widget here !

Just found one small bug, when using vector as button images there are artefacts after the growing upon selection. It is not related to xml vector size as they are far bigger than what is displayed and without issue outside of this case.

ceryle commented 7 years ago

Hi Alex, I will take a look at that issue.

Alex293 commented 7 years ago

@ceryle For now I've disabled the growing effect so this not really a priority. Tho I'd like you thoughts on #24

ceryle commented 7 years ago

Hi, I made a research and test about this issue and found that below api level 21, you lose definition and it causes deformation on image. The reason is android pre-renders vector drawables in pre21. You have to change vector's width and height attributes. You can find more information in here: https://developer.android.com/training/material/drawables.html#VectorDrawables http://stackoverflow.com/questions/34936590/why-isnt-my-vector-drawable-scaling-as-expected