Class TextAnimationHelper

  • All Implemented Interfaces:

    
    public class TextAnimationHelper
    
                        

    Text display animation helper - handles ViewHolder reuse in RecyclerView

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static void addPendingAnimation(String messageUid) Add a message UID that needs a display animation
      static void startWithUidCheck(View containerView, TextView textView, String text, String messageUid, boolean isLeftToRight) Smartly start a display animation based on message UID.
      static boolean needsAnimation(String messageUid) Check whether the specified message UID needs an animation
      static void clearAllCache() Clear all caches
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextAnimationHelper

        TextAnimationHelper()
    • Method Detail

      • addPendingAnimation

         static void addPendingAnimation(String messageUid)

        Add a message UID that needs a display animation

      • startWithUidCheck

         static void startWithUidCheck(View containerView, TextView textView, String text, String messageUid, boolean isLeftToRight)

        Smartly start a display animation based on message UID. Uses animation for the first display, otherwise shows full content directly.

      • needsAnimation

         static boolean needsAnimation(String messageUid)

        Check whether the specified message UID needs an animation