Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah easy. Unfortunately vector drawables are API21+ on Android. A large chunk of my users aren't on API21+. Google helpfully provides app compatibility with older versions by rasterizing to all possible dpi sizes during the gradle build process which makes your apk huge of course and defeats the purpose of vector drawables. So you probably want to try a third party library instead of vector drawables. The most popular one seems to be badaboom/androidsvg. It requires setup code on every imageview to load. So you probably want to use a custom view to make it easier and avoid repeating code everywhere. Of course then you use other libraries that aren't setup to use those custom views and your back to manually rasterizing in code. Easy!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: