Skip to content

Instantly share code, notes, and snippets.

@marshall
Created July 21, 2010 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshall/483975 to your computer and use it in GitHub Desktop.
Save marshall/483975 to your computer and use it in GitHub Desktop.
// Note: this isn't public API, so there should be lots of error checking here
Method gciMethod = Resources.class.getMethod("getCompatibilityInfo");
Object compatInfo = gciMethod.invoke(view.getResources());
float appScale = (Float)compatInfo.getClass().getField("applicationScale").get(compatInfo);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment