What is actually Thread means?
A thread is an execution context, which is all the information a CPU needs to execute a stream of instructions.
Suppose you're reading a book, and you want to take a break right now, but you want to be able to come back and resume reading from the exact point where you stopped. One way to achieve that is by jotting down the page number, line number, and word number. So your execution context for reading a book is these 3 numbers.
More, you can read HERE
Back to the main topic, to create a splash screen by follow this tutorial, so the things that you have to do is like the following preparation :
- Image, if you don't have an image, you find find much on Google Image
See also : How to change language on apps without open menu setting. You can read more HERE
Modify your activity_main.xml, and paste the following code :
change android:background="@drawable/paper" with your image. And don't forget set the progressbar GONE.
Modify your MainActivity.java, please take a look of some code below :
A normal splash page is need a full screen. It means the action bar or something like that must be hidden. The following code will make the screen is full
Before enter to the thread, in your onCreate set the progressBar is VISIBLE. And after two second, the progressbar will GONE and the activity will move to the next activity. Take a look at the following code :
That'ss all about how to create splash screen using Thread. Hope it helps. Thank you