Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add the loading screen in starting of the android application

My app is loading the start page in 10 seconds. In that time of 10 sec android screen is blank. In that time I want to add the loading screen. How to add it? And tell me in app how to know the starting page is loading? And tell me how to do in my app?

like image 201
Anil M H Avatar asked Jun 28 '13 04:06

Anil M H


People also ask

What is a splash screen in Android?

Android Splash Screen is the first screen visible to the user when the application's launched. Splash screen is one of the most vital screens in the application since it's the user's first experience with the application.

How do I set up a splash screen?

The most straightforward way to create a simple splash screen was to create a dedicated theme overriding android:windowBackground with a drawable containing branding colors or a bitmap of a logo. The theme was set as an attribute of the launcher activity in AndroidManifest. xml.

Which option is used to add multiple screens in Android application?

Open the Recents screen. Swipe an app into view. Press the app icon in the app title bar. Select the split screen menu option.


1 Answers

use ProgressDialog.

ProgressDialog dialog=new ProgressDialog(context); dialog.setMessage("message"); dialog.setCancelable(false); dialog.setInverseBackgroundForced(false); dialog.show(); 

hide it whenever your UI is ready with data. call :

dialog.hide(); 
like image 158
Brijesh Thakur Avatar answered Oct 04 '22 15:10

Brijesh Thakur