Can I get the key from SharedPreferences if a know the associated value?
问题 Is it possible to get the "key" value from a SharedPreferences file if I know the "value" value it is paired with? Let's say I've gone into the SharedPreferences file and, through a user action, have got the value "London, UK". Now I want to get the KEY associated with the value "London, UK" and then use that for my next step, is this possible? The code I use at the moment to getAll data from the SharedPerferences, sort it by value, populate an AlertDialog with this data, deal with a user