How can i create a local highscore list - Android

707 views Asked by At

Hi i'm starting to finish up an app I've been working on for a while and i was wondering whats a good way to implement a highscore list of let's say the top 25 highscores with 2 columns(name,score). I was thinking of a listview possibly but im not sure how to make it not take up the whole screen. Any better ideas and suggestions are appreciated.

EDIT: How do i implement a framelayout

2

There are 2 answers

2
HaMMeReD On BEST ANSWER

You can put a ListView in a ViewGroup (such as a linearlayout or framelayout) to make it take a portion of the screen or share it.

You will also need to put the scores somewhere that persists, SharedPreferences, a Database, a file.

I typically serialize to JSON, simplest method for me.

3
dcanh121 On

ListView is always a good idea if you want to display same views (esp TextView) in a list. Are you also considering to upload scores online.