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

carouselview

> 编程语言
Open source

A simple library to add carousel view in android app.

1.2K stars0 likes1 views
WebsiteGitHub

About

A simple library to add carousel view in android app.

CarouselView

A simple yet flexible library to add carousel view in your android application.

Download

Gradle:

groovy
compile 'com.synnapps:carouselview:0.1.5'

Maven:

xml

  com.synnapps
  carouselview
  0.1.5
  pom

Usage

Include following code in your layout:

xml
    

Include following code in your activity:

…

If you want to add custom view, implement ViewListener.

…

If you'd like to receive touch events for each image

java
customCarouselView.setImageClickListener(new ImageClickListener() {
            @Override
            public void onClick(int position) {
                Toast.makeText(SampleCarouselViewActivity.this, "Clicked item: "+ position, Toast.LENGTH_SHORT).show();
            }
        });

If using ProGuard add this line to your proguard-rules.pro:

-keep class com.synnapps.carouselview.** { *; }

Supported xml Attributes

Attribute Description Values
app:slideInterval Interval per page in ms. integer
app:indicatorGravity Gravity of the indicator. (Just like layout_gravity) gravity
app:indicatorOrientation Orientation of the indicator. [horizontal, vertical]
app:indicatorVisibility Set visibility of indicator. [visible,invisible,gone]
app:fillColor Color of the filled circle that represents the current page. color
app:pageColor Color of the filled circles that represents pages. color
app:radius Radius of the circles. This is also the spacing between circles. dimension
app:snap Whether or not the selected indicator snaps to the circles. boolean
app:strokeColor Width of the stroke used to draw the circles. color
app:autoPlay Whether or not to auto play. Default: true boolean
app:disableAutoPlayOnUserInteraction Disables autoPlay when user interacts. Default: false boolean
app:indicatorMarginHorizontal Sets horizontal margin for Indicator in Carousel View dimension
app:indicatorMarginVertical Sets vertical margin for Indicator in Carousel View dimension
app:pageTransformInterval Sets speed at which page will slide from one to another in ms. integer
app:pageTransformer Sets page transition animation. [zoom,flow,depth,slide_over]
app:animateOnBoundary Sets whether to animate from last page. Default: true boolean

Note: Add xmlns:app="http://schemas.android.com/apk/res-auto" in your layout's root view.

Developed By

  • Sayyam Mehmood
  • Muhammad Rehan

Special Thanks

This library uses code snippet from Jake Wharton's ViewPagerIndicator to display page indicator.

License

Copyright 2016 Sayyam.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and 
limitations under the License.

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 17, 2026
Category编程语言
PricingOpen source

> Related tools

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