Android ppt of SharedPreferences. You can learn about storing data and accessing data.
Android app development is one of the trending technology. So I will make a ppt of android app development for you.
3. SharedPreferences Methods
Methods Return Type
getInt(String s, int i) Integer
getFloat(String s,float f) Float
getString(String s1,String s2) String
getBoolean(String s,boolean b) Boolean
getLong(String s,long l) Long
getAll() HashMap
Contains(String s) Boolean
4. SharedPreferences.Editor
Methods Info
putInt(String s,int i) For setting integer value
putFloat(String s,float f) For setting float value
putString(String s1,String s2) For setting string value
putBoolean(String s,boolean b) For setting boolean value
putLong(String s,long l) For setting long value
apply() For applying changes of preferences
commit() Used for commit the changes
clear() Clear all preferences value
5. SharedPreferences and Editor
SharedPreferences sharedPreferences =
getSharedPreferences(String prefName,int mode);
SharedPreferences.Editor editor = sharedPreferences.edit();
Note : When we set the value,We set mode as private in preferences.
Int Value Mode
MODE_PRIVATE or 0 Private mode
12. About Us
Please visit our site:
www.casestudyprogramming.com
Note: You can find code for this tutorial at our site. So visit our
site and learn it easily.