How add an Application Pre-loader/Startup screen/Splash Screen to My PhoneGap Android App

后端 未结 3 655
鱼传尺愫
鱼传尺愫 2020-12-31 17:28

I have created a Android app using phone Gap.It works fine.How I add a pre-loader image to My App.Now it show a white page while loading the application.

Help is hig

3条回答
  •  长情又很酷
    2020-12-31 17:38

    You could create an AsyncTask implementation for showing an image / progress indicator while your application's data is loading in the background thread.

    1. In the async task's onPreExecute method you show the chosen preloader (image / ProgressDialog / etc)
    2. in the doInBackground method you start loading the necessary data, and
    3. in the onPostExecute method you remove/hide your preloader, so the activity's desired layout will be shown.

提交回复
热议问题