title: how to reset all stored data store using shared preferences
body: <p>I have created an activity where i have used shared preferences for storing data..now in another activity i have an reset button..when i click on the reset button the data store will be lost..so how that can be done..my code is</p>
  
  <p>code in activity1:</p>
  
  <pre><code>    public void writeToRegister()
      {
  
              // Write history data to register
              SharedPreferences preferences1  = getPreferences(MODE_PRIVATE);
              SharedPreferences.Editor editor1  = preferences1.edit();
              editor1.putInt("iHistcount", CycleManager.getSingletonObject().iHistCount);
              for(int i=0;i&lt; CycleManager.getSingletonObject().iHistCount;i++)
              {
                  editor1.putLong("dtHistoryDate"+Integer.toString(i), CycleManager.getSingletonObject().dtHistory[i].getTime());
  
              }
              editor1.commit();
      }
  
      public void readFromRegister()
      {
              // Read history data from register
              SharedPreferences preferences1 = getPreferences(MODE_PRIVATE);
              CycleManager.getSingletonObject().iHistCount=preferences1.getInt("iHistcount", 0);
              for(int i=0;i&lt; CycleManager.getSingletonObject().iHistCount;i++)
              {
                  Long x=preferences1.getLong("dtHistoryDate"+Integer.toString(i), 0L);
                  CycleManager.getSingletonObject().dtHistory[i]=new Date(x);
              }
      }
  </code></pre>
  
  <p>code for Activity 2:</p>
  
  <pre><code>Button pBtnReset = new Button(this); 
      pBtnNextMonth.setOnClickListener(pBtnReset OnClickListener);
      Button.OnClickListener pBtnReset OnClickListenernew Button.OnClickListener()
      {
                  public void onClick(View arg0)
                  {
  
  
                  }
      };
  </code></pre>
  
  <p>so what i have to write in second activity reset button so that it clear the stored data</p>