Search Results
Search Results for '리로드' : 1 POSTS
- 2010.08.08 화면 회전시 리로드하지 않고 내용 유지하기 (Orientation Change Keep Content) (5)
화면 회전시 리로드하지 않고 내용 유지하기 (Orientation Change Keep Content)
- Posted at 2010. 8. 8. 14:24
- Posted by 루지메이앙
- Filed under 안드로이드/VIEW (UI)
');
}
//-->
|
');
}
//-->
|
안드로이드는 화면의 orientation 변경시 기본적으로 onDestroy()를 호출 후 onCreate()를 호출하여
해당 화면의 액티비티가 초기화 되며 이것은 아래의 방법을 통해 방지가 가능합니다
주요시스템 변경은 onConfigurationChanged를 이용해 감지할 수 있습니다
keyboardHidden: 키보드가 보여지거나 숨겨지는것.
fontScale: 사용자가 원하는 폰트의 크기를 변경하는것.
locale: 사용자가 언어 세팅을 변경하는것.
keyboard: 키보드의 종류가 바뀌는것.
- AndroidManifest 에 정의
<activity android:configChanges="orientation|keyboardHidden"></activity>
- configChanges시 관련내용 제어하기
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); /* // 위 소스만 적용했을때 내용이 유지되고 추가 코드를 입력할때는 아래와 같이 한다 if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) // 가로모드로 변경되었을때 if (newConfig.keyboardHidden == Configuration.KEYBOARDHIDDEN_NO) // 키보드가 보여질때 */ }
- Configuration
http://developer.android.com/reference/android/R.attr.html#configChanges
http://developer.android.com/reference/android/content/res/Configuration.html
- Tag
- Android, Change, Keep Content, Orientation, 내용 유지, 리로드, 안드로이드, 화면 유지, 회전
- RSS :
- Response
- 0 Trackbacks 5 Comments
Comments List
- Comment List
-
scarpe hogan 2013.04.06 21:40 # M/D Reply
당신 매력있어, 자기가 얼마나 매력있는지 모르는게 당신매력이야
-
longchamp bags 2013.04.20 04:49 # M/D Reply
내 가슴에게 미안해리아하늘이시여
-
ralph lauren 2013.04.21 09:02 # M/D Reply
숨겨왔던 나의 수줍은 마음 모두 네게 줄게 예이예
-
nike free run pas cher 2013.04.24 20:31 # M/D Reply
행복을 졸겨야 할 시간은 지금이다. 행복을 즐겨야 할 장소는 여기다.Topics related articles:
http://rock2s.tistory.com/11 新建文章 4
http://b2jp.tistory.com/44 新建文章 6
http://chjung77.tistory.com/1347 新建文章 11
http://dohhee.tistory.com/43 新建文章 11 -
air max 95 2013.04.26 09:53 # M/D Reply
한국의 현대 시사에서