Tell me how the download functionality is implemented, whether it is wallpaper, or some other activity before launching the main application, this is the first question. And the second - is what methods are best to show the user to wait? The problem is that many data are downloaded from the Internet, so you have to wait. I would like to somehow warm up the screen (as when calling an alert dialog) and do it elegantly, not with a standard progressbar.

Closed due to the fact that it is necessary to reformulate the question so that you can give an objectively correct answer by the participants Vladyslav Matviienko , aleksandr barakin , cheops , zRrr , katso 15 May '16 at 10:28 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Well, make a custom dialogue, which show. It is not clear what exactly is your problem? - Vladyslav Matviienko
  • About custom dialogue - this is about understandable, I would like to see examples or listen to advice on how to do it better. - Ivan Vovk

1 answer 1

1 You can add an Activity that will act as a screensaver. And after a predetermined time has elapsed, launch the necessary one.

2 You can take the option from this question:

Define styles

 <style name="MyTheme" parent="android:Theme.Holo.Dialog"> <item name="android:alertDialogStyle">@style/CustomAlertDialogStyle</item> <item name="android:windowBackground">@color/transparent</item> <item name="android:textColorPrimary">#FFFFFF</item> <item name="android:backgroundDimEnabled">false</item> <item name="android:textColor">#FFFFFF</item> <item name="android:textStyle">normal</item> <item name="android:textSize">12sp</item> </style> <style name="CustomAlertDialogStyle"> <item name="android:bottomBright">@color/transparent</item> <item name="android:bottomDark">@color/transparent</item> <item name="android:bottomMedium">@color/transparent</item> <item name="android:centerBright">@color/transparent</item> <item name="android:centerDark">@color/transparent</item> <item name="android:centerMedium">@color/transparent</item> <item name="android:fullBright">@color/transparent</item> <item name="android:fullDark">@color/transparent</item> <item name="android:topBright">@color/transparent</item> <item name="android:topDark">@color/transparent</item> </style> 

in colors.xml

 <color name="transparent">#00000000</color> 

and call:

  progressDialog = new ProgressDialog(getActivity(),R.style.MyTheme); progressDialog.setCancelable(false); progressDialog.setProgressStyle(android.R.style.Widget_ProgressBar_Small); progressDialog.show(); 
  • Thank you, you pushed me to the desired branch. Can you tell us more about the first point? - Ivan Vovk
  • @IvanVovk Well, for example, your first activity displays only some kind of splash screen (picture with progress bar), and after 2 seconds, for example, you start the main Activity application from it. - VAndrJ