14 !" #$%&&'(%&&)*+!!" ,-).'(&()'/0.'&(&() 1 233""34" % /5"6 -# % 7### /" + %" 8+ 9" + 5" 7 " 233""3#333(#" 9 /5"6 -# 9 :#;: ;<7=#>" ? 233""3#333(#" 5 /5"6 -# 5 7:4 :@#content providers" + A /5"6 A Preferences#7#: < + :#:::" BCD #:" 77" 0 /5"6 0 Using Preferences API calls E, 1. getPreferences()7:+:; 2. getSharedPreferences()7::( 3. getDefaultSharedPreferences()+! +# 7 77 . /5"6 . Using Preferences API calls #FG77"""# """#" """HI$%&'(J Preference Container K L EDITOR """ # """ ' /5"6 ' Example /" ,4(!G:",<++ +";:> %" #M'')N(4" 9" O +#:#!G" 5" *(4+;!" Warning PQ;#:",- 4:#:Q(" )) /5"6 ) Example2: -#3R#-BG#S," ,:S,7 3" ,### S,"P#Q +P#Q" -G !*++, /&/& /5"6 /& Example2: -#3R#-BG S#-4Q" B--(*- T!;" ,#; <#;>" [...].. .14 Android – Preferences Preferences Example2: Saving/Retrieving a SharedPreference Object . cis493 .preferences; import java.util.Date; import android. app.Activity; import android. content.SharedPreferences; import android. graphics.Color; import android. graphics.Typeface; import android. os.Bundle; import. "MyPreferences_001"; // create a reference to the shared preferences object SharedPreferences mySharedPreferences; // obtain an editor to add data to my SharedPreferences object SharedPreferences.Editor. the shared preferences object mySharedPreferences = getSharedPreferences(MYPREFS, 0); myEditor = mySharedPreferences.edit(); // has a Preferences file been already created? if (mySharedPreferences