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

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -