Class EllipsizeTextView

  • All Implemented Interfaces:

    
    public class EllipsizeTextView
    
                        

    A TextView that supports multi-line middle ellipsis and ignores auto line-break behavior

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void setMaxLines(int maxLines)
      void setText(CharSequence text, BufferType type)
      void setEllipsizeText(CharSequence ellipsizeText, int ellipsizeIndex)
      void setAdaptiveText(String text) Set the text content of this TextView without automatic line-break adaptation.
      • Methods inherited from class java.lang.Object

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

      • EllipsizeTextView

        EllipsizeTextView(Context context)
      • EllipsizeTextView

        EllipsizeTextView(Context context, AttributeSet attrs)
    • Method Detail

      • setText

         void setText(CharSequence text, BufferType type)
      • setEllipsizeText

         void setEllipsizeText(CharSequence ellipsizeText, int ellipsizeIndex)
        Parameters:
        ellipsizeText - the ellipsis indicator text
        ellipsizeIndex - the number of characters from the end where ellipsis begins
      • setAdaptiveText

         void setAdaptiveText(String text)

        Set the text content of this TextView without automatic line-break adaptation.

        Parameters:
        text - the text to set