if(newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) { // 세로 전환시 발생
setContentView(R.layout.XXXX_vertical); // 세로 방향에서 사용할 레이아웃
} else if(newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { // 가로 전환시 발생
setContentView(R.layout.XXXX_horizontal); // 가로 방향에서 사용할 레이아웃
}
3. onCreate 함수 오버라이드
if( this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
setContentView(R.layout.XXXX_vertical); // 세로 방향에서 사용할 레이아웃
} else {
setContentView(R.layout.XXXX_horizontal); // 가로 방향에서 사용할 레이아웃
}