This is an excerpt from Learn by Doing - Android for Beginners on Udemy.
https://www.udemy.com/learn-by-doing-...
You will learn how to,
1. Read from Preferences
2. Write to Preferences
Things to Remember
-----------------------------
1. Obtain an instance of your SharedPreferences using the PreferenceManager.getDefaultSharedPreferences(Context) method.
2. Use the SharedPreferences.get*(String, *) set of methods to read a preference.
3. In order to write to a preference you will need an instance of an Editor, which is available from SharedPreferences.edit() method.
4. Put in new preferences using the Editor.put*(String, *) set of methods.
5. And make sure that you call the Editor.commit() method to save your changes.
Смотрите видео Android Tutorial 68 - Reading and Writing Preferences онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Code Here Now 25 Март 2014, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,548 раз и оно понравилось 5 людям.