android shared preferences example for high scores?
问题 Hi I was wondering is there any simple example of implementing a high score list using shared preferences? ie have pre determined high scores at the start and then update the list dependingt on the score a user gets? 回答1: If you want to use shared preferences the problem is that you can't really store a list or something like that. Shared preferences only supports boolean, float, int, String, long and Set. So your best choice is the Set. There you can convert each value of your highscore to a