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

ScrollChoice

> 编程语言
Open source

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

197 stars0 likes0 views
WebsiteGitHub

About

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

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 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javachoicescroll-viewselectionwheelview

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 推出的简洁高效系统语言