android vectordrawable - Render vector drawable from sd card -
i want show vector image (say testvector.xml) in imageview sd card. have written following code after following of older posts.
xmlpullparserfactory factory = xmlpullparserfactory.newinstance(); factory.setnamespaceaware(true); xmlpullparser parser = factory.newpullparser(); fileinputstream fis = new fileinputstream( file); parser.setinput(new inputstreamreader(fis)); drawable drawable = vectordrawablecompat.createfromxml(getapplicationcontext().getresources(), parser); imageview.setimagedrawable(drawable);
but getting following exception while running code.
android.util.xmlpullattributes can not cast android.content.res.xmlblock$
someone please tell me how suggestions in earlier posts did not work.
Comments
Post a Comment