Class StatusTextManager


  • public class StatusTextManager
    extends java.lang.Object
    • Constructor Detail

      • StatusTextManager

        public StatusTextManager​(@NonNull
                                 android.widget.TextSwitcher statusTextSwitcher,
                                 @NonNull
                                 StatusTextStyler textViewStyle,
                                 @AnimRes
                                 int outAnimationResource,
                                 @AnimRes
                                 int inAnimationResource)
      • StatusTextManager

        public StatusTextManager​(@NonNull
                                 android.widget.TextSwitcher statusTextSwitcher,
                                 @NonNull
                                 StatusTextStyler textViewStyle)
    • Method Detail

      • setStatusMessagesEnabled

        public void setStatusMessagesEnabled​(boolean statusEnabled)
      • updateStatus

        public void updateStatus​(@StringRes
                                 int newStatusStringRes)
        Updates the current status message with the given one. Previous status message must be shown for the predefined amount of time, which is enough for the user to read status message. This method can be called multiple times during that period, and only last requested update will be performed.

        If you want to force immediate update, call updateStatusImmediately(int).

        Parameters:
        newStatusStringRes - string resource ID of the new status message.
      • updateStatus

        public void updateStatus​(@NonNull
                                 java.lang.String newStatus)
        Similar to updateStatus(int) but takes string as argument.
        Parameters:
        newStatus - new status message
        See Also:
        updateStatus(int)
      • updateStatusImmediately

        public void updateStatusImmediately​(@StringRes
                                            int newStatusStringRes)
        Updates the current status message with the given one, immediately.
        Parameters:
        newStatusStringRes - string resource ID of the new status message.
        See Also:
        updateStatus(int)
      • updateStatusImmediately

        public void updateStatusImmediately​(@NonNull
                                            java.lang.CharSequence newStatus)
        Updates the current status message with the given one, immediately.
        Parameters:
        newStatus - new status message
        See Also:
        updateStatus(String)
      • shouldAnimate

        public boolean shouldAnimate()
      • setShouldAnimate

        public void setShouldAnimate​(boolean shouldAnimate)
      • setSimultaneouslyStartAnimations

        public void setSimultaneouslyStartAnimations​(boolean simultaneouslyStartAnimations)