百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

ScrollChoice

> 编程语言
开源

:heavy_check_mark: 可滚动的视图,可用于为用户提供不同的选择,具有漂亮的用户界面。

197 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

:heavy_check_mark: 可滚动的视图,可用于为用户提供不同的选择,具有漂亮的用户界面。

ScrollChoice

Scrollable view which can be used to give different choices to user with nice ui.

Preview

Add With Gradle Dependency

groovy
compile 'com.webianks.library:scroll-choice:1.0.1'

Maven:

xml

  com.webianks.library
  scroll-choice
  1.0.1
  pom

Min SDK

15

Compile SDK

25

Add ScrollChoice to layout

xml

From Java

Get the reference of ScrollChoice

java
ScrollChoice scrollChoice = (ScrollChoice) findViewById(R.id.scroll_choice);

Prepare your list items

java
List data = new ArrayList<>();
data.add("Brazil");
data.add("USA");
data.add("China");
data.add("Pakistan");
data.add("Australia");
data.add("India");
data.add("Nepal");
data.add("Sri Lanka");
data.add("Spain");
data.add("Italy");
data.add("France");

Add to the ScrollChoice object with default selected item index

java
scrollChoice.addItems(data,5);

Attach listener to listen to know which item was selected

java
scrollChoice.setOnItemSelectedListener(new ScrollChoice.OnItemSelectedListener() {
            @Override
            public void onItemSelected(ScrollChoice scrollChoice, int position, String name) {
                Log.d("webi",name);
            }
        });

Here 5 is the index of default selected item.

Customization Through XML

xml

    app:scroll_background_color="#212121"

    app:scroll_selected_item_background="#000000"

    app:scroll_item_text_color="#f5f5f5"

    app:scroll_atmospheric="true"

    app:scroll_indicator="true"

    app:scroll_indicator_color="#000000"

    app:scroll_item_align="center"

    app:scroll_selected_item_text_color="?attr/colorPrimary"

    app:scroll_selected_item_position="center"

    app:scroll_item_text_size="17sp"

    app:scroll_indicator_size="1dp"      

Test APK

Based on the awesome WheelPicker taken from SingleDateAndTimePicker by Florent CHAMPIGNY.

License

…

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javachoicescroll-viewselectionwheelview

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

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