title: How to retrieve a list of data from SharedPreferences
body: <p>I am trying to retrieve data from sharedPreferences:</p>
  
  <pre><code>    public static void loadArray(Context mContext) {
      SharedPreferences mSharedPreference1 = PreferenceManager.getDefaultSharedPreferences(mContext);
      WorkList.clear();
      int size = mSharedPreference1.getInt("Status_size", 0);
      for (int i = 0; i &lt; size; i++) {
          WorkList.add(mSharedPreference1.getString("Status_" + i, null));
      }
  }
  </code></pre>
  
  <p>i got this code but don't know how to call this method. I try to call this method in the same non-activity class.</p>