Hello. I Know the title of this post is quite twisted, so I will try to explain myself in my poor english! I am new at programming everything (less than one month experience), so my APP is far to be perfect or built in the right way!
My App opens up with eight buttons: seven of them leads to timers and one that leads to a page where all timers (counters) shows together. (In first thumb image you can see the BLUE button to the value of all timers together and the RED buttons to each of the seven timers).
To achieve this, I created seven "Services" classes and seven "public static textviews" (Oh yes, I'm guilty) updated by each service when started.
Now the problems comes with the "General Page" in which I want to show the started times in "Real Time". In the beginning I thought I could update this page with .... other public static textviews, directly from service files. But ... of course If I start a timer it crashes, because that
"general textview" is not yet created! To make it work I have to open (tap) general button first ... in this case timers won't crash because service files "know" what to update.
Using strings won't work, as I am getting a "fixed" value of the timer at the moment the general page is called.... and using a WHILE cycle to keep that string called (and showed) is freezing the App.
I also thought to use a boolean to know if general page was already called. If "false" .... on tapping to one of the counter, the APP would open the "general page" and then quickly back to the chosen counter ... I was not able to achieve IT.
What would you do (as a noob) in a case like this? (beside giving up of course!!!!)
Thank you very much for your help!
My App opens up with eight buttons: seven of them leads to timers and one that leads to a page where all timers (counters) shows together. (In first thumb image you can see the BLUE button to the value of all timers together and the RED buttons to each of the seven timers).
To achieve this, I created seven "Services" classes and seven "public static textviews" (Oh yes, I'm guilty) updated by each service when started.
Now the problems comes with the "General Page" in which I want to show the started times in "Real Time". In the beginning I thought I could update this page with .... other public static textviews, directly from service files. But ... of course If I start a timer it crashes, because that
"general textview" is not yet created! To make it work I have to open (tap) general button first ... in this case timers won't crash because service files "know" what to update.
Using strings won't work, as I am getting a "fixed" value of the timer at the moment the general page is called.... and using a WHILE cycle to keep that string called (and showed) is freezing the App.
I also thought to use a boolean to know if general page was already called. If "false" .... on tapping to one of the counter, the APP would open the "general page" and then quickly back to the chosen counter ... I was not able to achieve IT.
What would you do (as a noob) in a case like this? (beside giving up of course!!!!)
Thank you very much for your help!
