StickySwitch
StickySwitch copied to clipboard
SVG icons not working in SDK version 17
Hi,
thanks for this awesome switch. My app supports SDK versions up to version 17 and I use SVG icons for the sticky switch. So I've tested my app in a virtual device with SDK version 17 and the app crahses by inflating the layout with following exception exception.txt
It seems that the sticky switch doesn't support SVGs in older versions. If I use PNG icons, the app doesn't crash.
@khmegger I fixed the problem not loading the assets in the layout definition, instead in code with following snippet:
styickySwitch.setLeftIcon(ResourcesCompat.getDrawable(getResources(), R.drawable.my_vector_resource, null));
Please use this code also in the library to fix the issue