I already have a spreadsheet that I can use on my android to do these calculations, but the way these calculations work it's a natural for a small app. One of the guys I play this game with, Corbin, actually already started writing an app for it.
The goal of the app is to calculate the money made by any railroad in its region. There will be two simple classes - Railroads and Regions. Each will have its own screen to configure and control them, and a main screen will display latest revenue generation values for players to reference.
I could write the entire app to take place within a single Activity, but I want to get more experience with Fragments and this app is a simple enough concept that I can focus on the Fragment stuff without getting bogged down in the app itself.
Fragment are (in my limited understanding) like a kind of thread with its own UI elements and OS support. You can start a fragment to do a task that requires a user element, connect it with a container (like a square or layout) on the screen, and when the fragment is done control can return to the original creator.
As simple as that sounds, I have tons of questions like:
- How do you pass objects to fragments you create?
- How do you get those modified objects back?
- Can a fragment access objects in other parts of the overall app (Activity) directly? Would you want this to take place?
The answers to these simple questions illustrate clearly just how many gaps there are in my understanding!
I'll be writing more about these as I figure them out...
No comments:
Post a Comment