TextView requires the following key points to implement text scrolling: 1. The text length is longer than the display range: android: singleLine = "true"; 2. You can set the scrolling or display style: android: ellipsize = "marquee"; 3. The TextView class can be rewritten only when the focus is obtained. (However, if the focus is always given, it may not be clicked, such as when it is placed in the listView) public class AlwaysMarqueeTextView extends TextView {public AlwaysMarqueeTextView (Context context) {super (context );} public AlwaysMarqueeTextView (Context context, AttributeSet attrs) {super (context, attrs);} public AlwaysMarqueeTextView (Context context, AttributeSet attrs, int defStyle) {super (context, attrs, defStyle);} // always returns true, that is, always get focus @ Overridepublic boole An isFocused () {return true;} added TextView in the layout file: android: singleLine = "true" android: focusable = "true" android: marqueeRepeatLimit = "marquee_forever" // The number of scrolling times. At this time, the number of scrolling times is countless android: ellipsize = "marquee" ellipsize attribute setting how to display the control when the text is too long. You can set the following values: "start" -- ellipsis () at the beginning, "end" -- ellipsis () at the end, and "middle" -- ellipsis () in the middle; "marquee"-displayed as a marquee (horizontal movement of the animation)