2011-09-29 6 views

답변

7

사용 DisplayMatrics.xdpi 및 DisplayMatrics.ydpi가

xdpi The exact physical pixels per inch of the screen in the X dimension. 
ydpi The exact physical pixels per inch of the screen in the Y dimension. 

getResources().getDisplayMetrics().xdpi 
getResources().getDisplayMetrics().ydpi 
+0

그것이 작동합니다! 많이 고마워요! – Leo

7

DisplayMetrics 클래스와 densityDpi 클래스를 통해 액세스 할 수 있다고 생각합니다.

+6

사용 DisplayMetrics.densityDpi 단지 대략 value.For 예를 얻을 수 있고, 149 dpi의 스크린 장치는 대략 160 dpi의 값을 반환한다. – Leo

관련 문제