안드로이드 화면 크기 구하기

안드로이드 화면 크기 구하기


안드로이드로 작업 시 화면 크기를 구할 때 참고 할 수 있는 코드 입니다.


int width = getWindow().getWindowManager().getDefaultDisplay().getWidth();

int height = getWindow().getWindowManager().getDefaultDisplay().getHeight();

RonnieJ

유니티 엔지니어 출신으로, 프리랜서 IT강사, 개발자, 역자, 저자로 활동하고 있습니다. 게임 개발, C++/C#, 그래픽스 프로그래밍에 관심이 많습니다.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

Please turn AdBlock off

Notice for AdBlock users

Please turn AdBlock off