Skip to content

Instantly share code, notes, and snippets.

@gaeeyo
Created June 9, 2011 10:16
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 gaeeyo/1016474 to your computer and use it in GitHub Desktop.
Save gaeeyo/1016474 to your computer and use it in GitHub Desktop.
Densityを上書きすると面白い
@Override
public Resources getResources() {
DisplayMetrics dm = super.getResources().getDisplayMetrics();
dm.xdpi = 240;
dm.ydpi = 240;
dm.density = 1.5f;
dm.densityDpi = 240;
dm.scaledDensity = 1.5f;
return super.getResources();
}
// みたいな
// ApplicationでやってもWindowが出るたびに元に戻ってしまうのでActivityのgetResourceでやると良さそう?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment