Warning: I’m extremely new to coding/game design; please bear with me. :D
Overview: I’m using SharedPreferences to save an Int representing the Player’s high score. It’s fully functioning, and I can display and update the value within the main game loop. BUT, I’d like to display the player’s current high score on the main menu (The idea is when the player returns to the app, they’ll see their current high score).
Question: How can I display the user’s high score Int value on the main menu screen? I’m assuming I’d have to have the XML call a variable within the onCreate method of my main menu class? If so, what would that XML look like as well as its respective code in the class?
Again, this is my first time coding. I felt comfortable in Java until I needed an XML component. I think after I have a better grasp on how XML functions, I should be able to run with it, so any insight (even small) would be great.
Thanks! Joe