Wednesday, 3 May 2017

java - Saving an int variable "highscore" with sharedpreferences

I am developing a game and I have written all the code, including the code that makes sure the highscore int is updated. Now I am wondering how I could save this int with SharedPreferences. I am an beginning programmer, so could you give me all the steps I would have to do?




The variable highscore is in the MainView and I came to the understanding that you would have to save something with shared preferences in the MainActivity.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...