SharedPreferences(2)
-
SharedPreferences객체
SharedPreferences객체 어플리케이션에 연관된 간단한 데이터(String, int, boolean 등)을 파일시스템에 저장하고 가져올 수 있습니다. SharedPreferences객체는 key, value 쌍으로 파일생성하며 키를 통해 데이터를 가져올 수 있습니다. 환경설정시 많이 활용됩니다. 프리퍼런스에 데이터 쓰기 단계 1SharedPreferences객체 호출getSharedPreferences()2프리퍼런스에 데이터를 쓰기editor = sharedPreferences.edit(); editor.putXXXXXX();3데이터 저장(데이터 실제 저장)editor.commit();putXXXXXX(putString, putInt, putBoolean등)을 통해 데이터를 저장한후 반드시 co..
-
SharedPreferencesDemo-SharedPreferences객체를 통한 데이터 저장하기
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 추가 Graphic..