4 Replies Latest reply on Nov 28, 2013 8:35 AM by Ruben Ruben

    Loading widget (Spinner) randomly not appearing

    Ruben Ruben

      Hi,

       

      I'm trying to improve feedback for my app, by making sure a loading widget appears every time the user clicks on a button/link. The problem is that while in RhoSimulator, the spinner always appears, it does not behave the same way in my test device. The wheel will only appear some times.

       

      I've tried adjusting $.mobile.loadingMessageDelay with various values with no success. Should I show and hide the spinner manually as said here?: Re: Jquery Mobile Loading widget not shown

        • Re: Loading widget (Spinner) randomly not appearing
          Kutir Mobility

          Hi Ruben,

          Could you please share your code snippet as well as Rhodoe version?

          What device are you testing on?

           

           

          VP

          Kutir Mobility

            • Re: Loading widget (Spinner) randomly not appearing
              Ruben Ruben

              Hi: This is how I have my mobileinit:

                      <script type="text/javascript">

                          $(document).bind("mobileinit", function(){

               

                              $.mobile.hideUrlBar = true;

                              <% if Rho::System.platform == "WINDOWS" %>

                                $.mobile.defaultPageTransition = 'none';

                              <% else %>

                                $.mobile.defaultPageTransition = 'slidefade';

                              <% end %>              

                              $.mobile.defaultDialogTransition = 'none';

                              $.mobile.loadingMessageDelay = 50; // in ms

                          });

                      </script>

               

              I'm using jqmobile-patch.js but i've commented out jqmobile-patch.css, since it messes up some of my views. It happens on every view, so I don't know what other code I could share.

               

              My test device is a Samsung Galaxy S3 Mini, running Android 4.1.2, and I'm using Rhodes 4.0.0

               

               

              Temporary, i've created a "loadable" class that I use on every button or link, and added JS code to show the loading widget on those buttons/links. Solution would be perfect if it wasnt for the fact that clicking rapidly on the same link spawns two widgets, one of which stays often on the screen until you navigate away from the page.