简体   繁体   中英

Pre-populated scoretable in android

I'm very new to this and have gotten a bit stuck. I'm trying to build a small app for me and my friends to use, part of it will include keeping track of a score table. I've managed to cobble a basic structure together but I'm struggling knowing what I should use to produce the table.At the moment I've just got it in a tablelayout.

The data will consist of up to 12 rounds of scoring, so something like:

John, 43, 100, 47, 25 Jim, 100, 24, 36, 100 Fred, 53, 87, 100, 42

I'd like to make it so the total is the sum of all the rounds and the table that is viewed has a position in order (1st, 2nd, 3rd etc)

The idea would be that the list would not be user generated or modified, but pushed through with updates of the app and would be just there for reference on who is currently ahead by how many points.

I'm very new to this and haven't done any programming before so my head is buzzing at the moment just trying to figure out a way to do this and keep it reasonably up to date. I'm struggling to understand whither I should be using SQL, array, arraylists, room, gridlayouts, csv or whatever so I'd really appreciate a point in the right direction.

NB From the little I do know it sounds like having a remote sql database would be the ultimate way to go but I'd rather not pay for a server if I can avoid it.

thanks

You'll be best off using SQLite if you want to manipulate your data, especially if you think the database will expand. Have a look here about how to create a data base in android.

How do I use SQLite in android?

Using that you should be able to build a database, call it and return the results in an activity

I'm unsure about the file structure in AIDE, but I'm sure you can figure it out with a bit if trial and error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM