Method One: (can only achieve a single textview of the marquee effect)
In TextView add the following controls android:singleline= "True" can only be a single line, the excess text appears as "..." android:ellipsize= "marquee" ellipsis no, but no marquee effect Android: Focusable= "true" android:focusableintouchmode= "true" method two: (can achieve multi-line TextView of the marquee effect) custom A class inherits TextView, implements the default three kinds of constructors, Override the IsFocused () method to return true to change TextView in the layout file (package name + Class name) Com.imooc.marqueetextviewdemo.MarqueeText parsing: Method Two of the two TextView are able to achieve the marquee effect is because the rewritten isfocused () method returns True, Forcing the TextView to focused; In method one, the first TextView gets the focus, and the second TextView does not have the focus and does not achieve the marquee effect problem: Scrolling will stop itself after a while: Android: marqueerepeatlimit= "Marquee_forever" TIPS:PX,DP (DIP), SP1. The use of PX,PX is not recommended in development, and the 2.DP and SP can be scaled according to the resolution; 3. It is recommended to use DP,SP more for displaying text size;4 when making a length size limit in the control. DP is recommended in the latest Android SDK
Android Interface (1) use TextView to achieve a marquee effect