Android Loading Screen: How do I go about using a stack to load elements, and the option of incrementing the size counter?

Posted by tom_mai78101 on Game Development See other posts from Game Development or by tom_mai78101
Published on 2012-03-31T07:14:28Z Indexed on 2012/03/31 11:43 UTC
Read the original article Hit count: 224

Filed under:
|
|

I have some problems with figuring out what value I should put in the function:

int value_needed_to_figure_out = X;
ProgressBar.incrementProgressBy(value_needed_to_figure_out);

I've been researching about loading screens and how to use them. Some examples I've seen have implemented Thread.sleep() in a Handler.post(new Runnable()) function. To me, I got most of that concept of using the Handler to update the ProgressBar, while pretending to do some heavy crunching work. So, I kept looking.

I have read this thread here: How do I load chunks of data from an assest manager during a loading screen?

It said that I can try using a stack it needs to load, and adding a size counter as I add elements to the stack. What does it mean? This is the part where I'm totally stumped.

If anyone would provide some hints, I'll gladly appreciate it. Thanks in advance.

© Game Development or respective owner

Related posts about java

Related posts about assets