2010년 3월 30일 화요일

Landscape 와 Portrait 상태일 때 TextView 변경

if( getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){
            tv.setText("Test");
        } else if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ){
            tv.setText("Hello");
        }


가로 화면일 때는 Hello, 세로화면일 때는 Test가 보여진다.

댓글 없음:

댓글 쓰기