Class ProgressSpinnerScheduler


  • public class ProgressSpinnerScheduler
    extends java.lang.Object
    This scheduler is in charge to tell it's listener (Activity) when to display the progress spinner.

    Purpose of this scheduler : When a user kicks off a background operation if the operation takes a very short time (like parsing a json files) the progress spinner is shown and gone for a few milliseconds which gives a flickering effect. To avoid this effect this scheduler wait for 0.5 sec before displaying the spinner, then if background operation is still running after 0.5 sec we show the spinner for a minimum of 1 sec.

    Note: a transparent layer is applied first to avoid the user from clicking any views twice.

    • Constructor Summary

      Constructors 
      Constructor Description
      ProgressSpinnerScheduler​(com.yoti.mobile.android.common.ui.widgets.progress.ProgressSpinnerScheduler.Listener listener, android.os.Handler handler)  
    • Constructor Detail

      • ProgressSpinnerScheduler

        public ProgressSpinnerScheduler​(@NonNull
                                        com.yoti.mobile.android.common.ui.widgets.progress.ProgressSpinnerScheduler.Listener listener,
                                        @NonNull
                                        android.os.Handler handler)
    • Method Detail

      • startProgress

        public void startProgress()
      • stopProgress

        public void stopProgress()
      • stopProgressImmediate

        public void stopProgressImmediate()