I have a custom Array Adapter to display a list of items, in this case, highscores. The system sort of mimics a folder scheme; one clicks a folder named “Game 1” and it goes to a new list with the top 10 scorers. When you take a test, it changes a sharedpreferences called isPlayed, and if isPlayed is 1, the image for that Game, Game 1, is green, otherwise, if you never play Game 1, isPlayed is never 0, and therefor the image on the highscore list of games is red. But, SharedPreferences seems to be unknown in a class that extends ArrayAdapter. How can I use data from sharedpreferences here? Post a question if you need more info.
Share
You can access SharedPreferences with –
getContext().getSharedPreferences(String name, int mode)