안드로이드 tv팟 개발하다가 안 사실인데 쿼티 자판 있는 모델은 슬라이드시에 Destory() 콜을 하더군요
그래서 페이지가 refresh가 자동으로 되는 현상이 나타납니다. 심지어는 동영상 재생시 슬라이스를 하면 동영상이 다시 처음부터 재생되는 현상이 나타나더군요.

그래서 처음엔 슬라이스시에 호출되는 메소드가 가로모드, 세로모드 전환시 호출되는 메소드가 같을 꺼라 생각하고 관련 자료를 찾아보니 아래와 같인 메소를 찾을 수 있었습니다. 

@Override
public void onConfigurationChanged(Configuration newConfig) {
System.out.print("test");
switch(newConfig.orientation){
case Configuration.ORIENTATION_LANDSCAPE:
System.out.print("가로");
return;
case Configuration.ORIENTATION_PORTRAIT:
System.out.print("세로");
return;
}
super.onConfigurationChanged(newConfig);
}

하지만 위의 메소드는 가로세로 모드 전환시에만 호출되지 슬라이스와는 상관이 없던 메소드더군요 그래서 구글링을 더 해본 결과 Manifest.xml 설정을 통해 슬라이드시 환경변화 작업을 무시하도록 아래와 같이 설정가능함을 발견했습니다.

<activity android:name=".ClipView" android:label="Media/MediaPlayer"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"      
android:configChanges="keyboardHidden|orientation" >
</activity>

자세한 사항은 아래주소를 참고하세요.
 
Posted by 빈솔B
,