Created
June 9, 2011 10:16
-
-
Save gaeeyo/1016474 to your computer and use it in GitHub Desktop.
Densityを上書きすると面白い
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
@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