title: Get the Shared Preferences "Key" according to the "Value" in android
body: <p>What I am trying to do is to delete the row from the listview in android. I am successful in doing this. But now my problem is when I delete the row values from ListView at the same time I want to delete the Value and the key from my Shared Preferences.</p>
  
  <blockquote>
    <p>How I want to do that is: When I delete the row Value from the list. I wanna get the value of that row and check in my Shared Preferences for that value. If that "Value" is there then I will get the "Key" based on that "Value". I know there is a way like: <code>sharedPrefEditor.remove(key);</code> but what I am thinking that if there is something related to: sharedPrefEditor.remove("key","Value"), then it would have been great because this way I can easily delete the "specific"key/value pair. I hope you guys are g</p>
  </blockquote>
  
  <p>HINT: I have saved the "Keys" for the Shared Preferences according to the TimeStamp i.e The time when I was saving the "Key".</p>
  
  <p>Please be free to fire any questions to me anytime.
  Thanks you.</p>
  
  <p>EDIT: HERE IS THE CODE WHEN I AM ADDING THE VALUES TO THE ARRAYLIST.</p>
  
  <pre><code> // get the list values from SharedPreferences
          Map&lt;String, ?&gt; allEntries = MapActivity_sp.getAll();
          for (Map.Entry&lt;String, ?&gt; entry : allEntries.entrySet()) {
              if (entry.getKey().toString().contains("passedAddressValue")) {
                  if (getpassedAddressValue.contains(entry.getValue().toString())) {
                      //nothing
                  } else
                      getpassedAddressValue.add(entry.getValue().toString());
  
              }
          }
          adapter = new InflateLocations(this, getpassedAddressValue, lv);
          lv.setAdapter(adapter);
  </code></pre>