How To Store And Retrieve ArrayList In SharedPreferences

In Android Application Development there are plenty of options available for storing data in android, but for storing preference related settings can be easily stored and retrieved using sharedPreference class. In this tutorial we are going to store custom arraylist in sharedpreferences. Here we convert arraylist data to json format using Gson and save it as string. During retrieving we convert json string into arraylist.