[ 
https://issues.apache.org/jira/browse/CB-9516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Shakhnazarov updated CB-9516:
------------------------------------
    Labels: android easyfix  (was: easyfix)

> Android SplashScreen - Spinner Does Not Display
> -----------------------------------------------
>
>                 Key: CB-9516
>                 URL: https://issues.apache.org/jira/browse/CB-9516
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin SplashScreen
>    Affects Versions: 5.0.1
>         Environment: Cordova 5 and Android Lollipop 5.0 and 5.1
>            Reporter: Mark Ludlow
>            Priority: Minor
>              Labels: android, easyfix
>
> The spinner dialog is not displaying on Android. I believe one cause of this 
> is the message "spinner > stop" which being used to display the webview, is 
> also stopping the spinner prematurely.
> See this comment in CoreAndroid.js:
> // This gets called from JavaScript onCordovaReady to show the webview.
> // I recommend we change the name of the Message as spinner/stop is not
> // indicative of what this actually does (shows the webview).
>                 cordova.getActivity().runOnUiThread(new Runnable() {
>                     public void run() {
>                         webView.getPluginManager().postMessage("spinner", 
> "stop");
>                     }
>                 });
> The "spinner > stop" message is fired almost immediately after 
> SplashScreen.spinnerStart() is called, thus hiding the spinner before it 
> actually displays. I was able to partially fix this by commenting out the 
> call to spinnerStop() in the "spinner > stop" message handler:
> if ("spinner".equals(id)) {
>             if ("stop".equals(data.toString())) {
>                 //this.spinnerStop();
>                 getView().setVisibility(View.VISIBLE);
>             }
>         }
> The second issue, at least for Cordova 5 and Lollipop, is that in the 
> pluginInitialize() method, loadSpinner() is being called before 
> showSplashScreen(true).
> I reversed these lines and made the change above and now the splashscreen 
> displays correctly. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to