Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
V

VerticalRollingTextView

> 编程语言
Open source

竖直方向无限循环滚动显示文本的控件

188 stars0 likes1 views
WebsiteGitHub

About

竖直方向无限循环滚动显示文本的控件

VerticalRollingTextView

竖直方向无限循环滚动文本的控件

非常轻量级,直接继承View实现

使用方法:

先在项目build.gradle中添加依赖:

compile 'com.xiaosu:VerticalRollingTextView:2.0.9'

1.现在布局文件中声明

2.代码中设置数据集:

mVerticalRollingView.setDataSetAdapter(new DataSetAdapter(mDataSet) {

            @Override
            protected CharSequence text(CharSequence charSequence) {
                return charSequence;
            }
        });

3.开始滚动:

mVerticalRollingView.run();

4.暂停:

mVerticalRollingView.stop();

5.设置点击监听:

mVerticalRollingView.setOnItemClickListener(this);

6.点击回调

public void onItemClick(VerticalRollingTextView view, int index) {
    //index是当前条目的角标
}

7.可以在布局中设置的属性:

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言