You're going to learn how to make a progressbar, which gives you a feedback what's going on in the background.
Let say you have a LoadingScreen activity (loadingscreen.xml layout), and a Main activity (main.xml).
You'd like to do some job in the Main activity, and update the progressbar status at the same time. To do this, we are going to use Messages. Although, you can update you're progressbar by sending the progressbar instance itself to your Main activity, but that's obviously not the prettiest solution.
What we going to do is:
1. Declaring a progressbar instance in LoadingScreen Activity:
So in your LoadingScreen.java, after Oncreate(), you should add something like this line to your codeline: (don't forget to add a progressbar to your layout first!)
In this tutorial we'll create a custom View called HorizontalSlider based on ProgressBar. This slider will allow the user to move the slider back and forth on the screen and get notified when this happens.