Method for Android to realize running lamp effect based on textview attribute Android: ellipsize
•
Android
This article gives an example of how Android can realize the effect of running lantern based on textview attribute Android: ellipsize. Share with you for your reference, as follows:
Textview in Android system must meet the following conditions to realize the running light effect:
1. Android: ellipsize = "marquee" 2. The textview must be displayed in a single line, that is, the content must exceed the size of the textview. 3. The textview cannot scroll until it obtains focus
XML code:
Java code:
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码