IT/Android
diplay.getOrientation
bestrok
2011. 10. 27. 14:44
1. 윈도메니저를 통해 현재 화면이 landscape 인지 portrait 인지 확인할 수 있다.
##########################################################################
int mOrientation = getWindowManager().getDefaultDisplay().getOrientation();
##########################################################################
화면은 반시계방향으로 0,1,2,3 으로 로테이션 된다.
각도 | 반환값 | 참고 |
---|---|---|