What's the difference between getDefaultSharedPreferences() and getPreferences()?

前端 未结 4 1937
挽巷
挽巷 2020-12-09 18:54

I\'m currently taking the \"Developing Android Apps\" Udacity course. In the \"Lesson 3: New Activities and Intents > Use SharedPreferences\" segment, the instructor asked

4条回答
  •  隐瞒了意图╮
    2020-12-09 19:38

    From the first article linked below: "Note: The SharedPreferences APIs are only for reading and writing key-value pairs and you should not confuse them with the Preference APIs, which help you build a user interface for your app settings (although they use SharedPreferences as their implementation to save the app settings)."

    http://developer.android.com/training/basics/data-storage/shared-preferences.html

    http://developer.android.com/guide/topics/ui/settings.html

提交回复
热议问题