Class StatusTextManager
java.lang.Object
com.microblink.blinkid.fragment.overlay.components.statusmsg.StatusTextManager
-
Constructor Summary
ConstructorDescriptionStatusTextManager
(android.widget.TextSwitcher statusTextSwitcher, StatusTextStyler textViewStyle) StatusTextManager
(android.widget.TextSwitcher statusTextSwitcher, StatusTextStyler textViewStyle, int outAnimationResource, int inAnimationResource) -
Method Summary
Modifier and TypeMethodDescriptionvoid
setShouldAnimate
(boolean shouldAnimate) void
setSimultaneouslyStartAnimations
(boolean simultaneouslyStartAnimations) void
setStatusMessagesEnabled
(boolean statusEnabled) boolean
void
updateStatus
(int newStatusStringRes) Updates the current status message with the given one.void
updateStatus
(String newStatus) Similar toupdateStatus(int)
but takes string as argument.void
updateStatusImmediately
(int newStatusStringRes) Updates the current status message with the given one, immediately.void
updateStatusImmediately
(CharSequence newStatus) Updates the current status message with the given one, immediately.
-
Constructor Details
-
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 Details
-
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
Similar toupdateStatus(int)
but takes string as argument.- Parameters:
newStatus
- new status message- See Also:
-
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:
-
updateStatusImmediately
Updates the current status message with the given one, immediately.- Parameters:
newStatus
- new status message- See Also:
-
shouldAnimate
public boolean shouldAnimate() -
setShouldAnimate
public void setShouldAnimate(boolean shouldAnimate) -
setSimultaneouslyStartAnimations
public void setSimultaneouslyStartAnimations(boolean simultaneouslyStartAnimations)
-