title: how to add multiple values in shared preferences android
body: <p>I have shared preference . I want to store multiple values that are present on the listview .</p>
  
  <p>I am getting the data but not full data .</p>
  
  <p>The code is present in the base adapter and kindly please help me i am running out of time .</p>
  
  <pre><code>Map&lt;String, String&gt; nameIcons = new HashMap&lt;String, String&gt;();
      nameIcons.put("publisheddate",publisheddate);
      nameIcons.put("validity",validity);
      nameIcons.put("accessstatus",accessstatus);
  
        settings=ctxt.getSharedPreferences("com.contentraven",0);
        editor=settings.edit();
  
        editor.clear();
        editor.commit();
        for (String s : nameIcons.keySet()) 
        {
            editor.putString(s, nameIcons.get(s));
        }
  
        editor.commit();
  </code></pre>