Created
April 19, 2016 12:46
-
-
Save uebi-belli/3c07323c8055a3b66ccac0d388b2b013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Bitmap getBitmapExt(Context context, String name){ | |
Bitmap bitmap = null; | |
try { | |
if(expansionFile == null){ | |
PackageInfo pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0); | |
expansionFile = APKExpansionSupport.getAPKExpansionZipFile(context, pInfo.versionCode, 0); | |
} | |
InputStream is = expansionFile.getInputStream("images/" + name + ".png"); | |
bitmap = BitmapFactory.decodeStream(is); | |
} | |
catch (Exception e){ | |
e.printStackTrace(); | |
} | |
return bitmap; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment