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!

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
分享
二维码
< <上一篇
下一篇>>