Class TextAnimationHelper

  • All Implemented Interfaces:

    
    public class TextAnimationHelper
    
                        

    文本展示动画帮助类 - 专门处理RecyclerView中ViewHolder复用的情况

    • 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) 添加需要展示动画的消息UID
      static void startWithUidCheck(View containerView, TextView textView, String text, String messageUid, boolean isLeftToRight) 根据消息UID智能启动展示动画 如果是第一次显示则使用动画,否则直接显示完整内容
      static boolean needsAnimation(String messageUid) 检查指定消息UID是否需要执行动画
      static void clearAllCache() 清除所有缓存
      • 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)

        添加需要展示动画的消息UID

      • startWithUidCheck

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

        根据消息UID智能启动展示动画 如果是第一次显示则使用动画,否则直接显示完整内容

      • needsAnimation

         static boolean needsAnimation(String messageUid)

        检查指定消息UID是否需要执行动画