Issue
Well i am working on Expansion Files. I am getting the file and now i am trying to access the content of expansion file which is a zip file . I got expansion file entries in "expansionFile". Now i am getting input stream from expansion file.
Here is the look of my exapnsion file:
main.1.com.test.downloader.obb
inside it there is assets folder and inside assets folder there are images.
Here is my code:
InputStream fileStream = expansionFile.getInputStream("assets/");
Log.i("File",""+fileStream.toString());
Drawable drawable = Drawable.createFromStream(fileStream, "abacus.jpg");
I am getting error on Drawable line. I think i am doing something wrong
Solution
After search i came to know that here is the solution:
InputStream fileStream = expansionFile.getInputStream("assets/"+imageName);
Drawable drawable = Drawable.createFromStream(fileStream, null);
_imageView.setImageDrawable(drawable);
Answered By - User42590
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.