Android imitation Taobao headlines realize the effect of scrolling notification up and down based on textview
Recently, a project needs to realize the up and down scrolling effect of the notice bar, which imitates the headlines of Taobao.
I read some code from the Internet and made the complete effect. As shown in the figure:
The specific code fragments are as follows:
1. Create a new Anmin folder under the res folder and create two files in this folder
(1).anim_ marquee_ Animation on in.xml entry
(2).anim_ marquee_ Animation on out.xml exit
2.activity_ main.xml
3.noticelayout.xml
4.MainActivity.java
The above is the Android imitation Taobao headline introduced by Xiaobian. It realizes the up and down rolling notification effect based on textview. I hope it will be helpful to you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!