CODEDRAGON ㆍDevelopment/Android
SharedPreferences객체를 통한 데이터 저장하기
강의 내용
activity_main.xml |
LinearLayout(Vertical) 변경 Graphical Layout > Form Widgets-TextView 추가 Graphical Layout > Form Widgets-Button추가 Graphical Layout > Form Widgets-Button추가 Graphical Layout > Form Widgets-Button추가
Graphical Layout > Text Fields-Plain Text 추가 Graphical Layout > Form Widgets-ProgressBar(Normal) 추가 Graphical Layout > Composite-ListView 추가 Graphical Layout > Composite-WebView추가
Graphical Layout > image&Media-ImageView 추가 Graphical Layout > Layouts-LinearLayout(Horizontal) 추가 Graphical Layout > Layouts-LinearLayout(Vertical) 추가 Graphical Layout > Composite-ScrollView추가 |
main_two.xml |
LinearLayout(Vertical) 변경 Graphical Layout > Form Widgets-Button추가 |
MainActivity.java |
//프리퍼런스에 데이터 쓰기 //프리퍼런스 읽기 //화면 이동 |
MainTwo.java |
- |
AndroidManifest.xml |
<activity android:name="MainTwo"></activity> |
출력 결과
생성파일 확인경로
DDMS > File Explorer > data\data\kr.android.preferences\shared_prefs\PreferencesEx.xml