Created
February 1, 2014 22:50
-
-
Save bleege/8760232 to your computer and use it in GitHub Desktop.
Android Resource Loading Models Comparison
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
From Marker.java | |
/** | |
* Set this marker's icon to a marker from the Maki icon set. | |
* | |
* @param makiString the name of a Maki icon symbol | |
*/ | |
public void fromMaki(String makiString) { | |
String urlString = "/com/mapbox/" + makiString+"182x"; | |
logger.info("urlString = '" + urlString + "'"); | |
Drawable drawable = mResourceProxy.getMapBoxDrawable(urlString); | |
logger.info("drawable = '" + drawable + "'"); | |
this.setMarker(drawable); | |
/* | |
String urlString = makiString+"182x"; | |
int id = context.getResources().getIdentifier(urlString, "drawable", context.getPackageName()); | |
this.setMarker(context.getResources().getDrawable(id)); | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment