Created
December 16, 2016 19:33
-
-
Save Nazmul56/0bfe02be9539c4314d6ccfdb8a40686f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Bitmap getTileBitmap(int id, int size) { | |
String string = tileUrls.get(id); | |
if (string.contains(Themes.URI_DRAWABLE)) { | |
String drawableResourceName = string.substring(Themes.URI_DRAWABLE.length()); | |
int drawableResourceId = Shared.context.getResources().getIdentifier(drawableResourceName, "drawable", Shared.context.getPackageName()); | |
Bitmap bitmap = Utils.scaleDown(drawableResourceId, size, size); | |
return Utils.crop(bitmap, size, size); | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment