How to load from assets folder?
Closed this issue · 3 comments
litao0621 commented
hi,
I want to load gif from assets folder.But i don't know how to use.Hope you can help. Thanks.
felipecsl commented
InputStream inputStream = context.getAssets().open(gifAsset);
byte[] bytes = IOUtils.toByteArray(inputStream);
gifImageView.setBytes(bytes);
felipecsl commented
BTW you'll need Commons IO for this:
compile 'commons-io:commons-io:2.4'
litao0621 commented
Thank you very much:smile: