IndicatorView Library For Android

Overview

IndicatorView

Build Status Android Arsenal

A simple library to add indicators for your Carousel or ViewPagers.

Download

Step 1. Add the JitPack repository to your build file

Gradle

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Maven
<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Step 2. Add the dependency

Gradle
dependencies{
    compile 'com.github.Kshitij-Jain:IndicatorView:1.25'
}

Maven
<dependency>
    <groupId>com.github.Kshitij-Jain</groupId>
    <artifactId>IndicatorView</artifactId>
    <version>1.25</version>
</dependency>

Usage

Include following code in your layout:

<io.github.kshitij_jain.indicatorview.IndicatorView
            android:id="@+id/circle_indicator_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:layout_gravity="center"/>

Include following code in your activity:

IndicatorView mIndicatorView = (IndicatorView) findViewById(R.id.circle_indicator_view);
mIndicatorView.setPageIndicators(4);
mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
       @Override
       public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
       }

       @Override
       public void onPageSelected(int position) {
            mIndicatorView.setCurrentPage(position);
       }

       @Override
       public void onPageScrollStateChanged(int state) {
       }
});
Supported xml attributes:
 app:activeColor="@color/colorPrimary" // Set Active Indicator Color
 app:inactiveColor="@color/colorAccent" // Set Inactive Indicator Color
 app:indicatorSize="6dp" // Set Indicator Size (Default 8dp)
Other supported methods:
 mIndicatorView.setActiveIndicatorColor(R.color.colorAccent); // Set Active Indicator Color
 mIndicatorView.setInactiveIndicatorColor(R.color.colorPrimary); // Set Inactive Indicator Color

License

Copyright 2017 Kshitij Jain

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.
You might also like...
Circular motion is a ViewPager library that can be used to make Awesome Onboarding designs.

CircularMotion Android Circular Motion Onboarding library Circular motion is a ViewPager library that can be used to make Awesome Onboarding designs.

Three material Dots Indicators for view pagers in Android !
Three material Dots Indicators for view pagers in Android !

Material View Pager Dots Indicator This library makes it possible to represent View Pager Dots Indicator with 3 different awesome styles ! It supports

A pager for Android with parallax effect

ParallaxPagerTransformer A pager transformer for Android with parallax effect Installation in your build.gradle file dependencies { // ... com

A nicer-looking, more intuitive and highly customizable alternative for radio buttons and dropdowns for Android.
A nicer-looking, more intuitive and highly customizable alternative for radio buttons and dropdowns for Android.

SwipeSelector Undergoing for some API changes for a 2.0 major version, see example usage in the sample module! What and why? Bored of dull looking rad

Android auto scroll viewpager or viewpager in viewpager
Android auto scroll viewpager or viewpager in viewpager

Android Auto Scroll ViewPager ViewPager which can auto scrolling, cycling, decelerating. ViewPager which can be slided normal in parent ViewPager. Att

An android ViewPager extension allowing infinite scrolling

NO LONGER MAINTAINED LoopingViewPager An android ViewPager extension allowing infinite scrolling. You can use it with "standart" PagerAdapter (inflati

Augment Android's ViewPager with wrap-around functionality.

Infinite View Pager Augment Android's ViewPager with wrap-around functionality. Original StackOverflow question: http://stackoverflow.com/questions/75

[Development stopped in 2014. Unfinished and not stable - not recommended to use.] An easy-to-use ViewPager subclass with parallax background effect for Android apps.

Development stopped in 2014 Not developed since 2014. Unfinished and not stable - not recommended to use. ParallaxViewPager An easy-to-use ViewPager s

Android - A ViewPager page indicator that displays the current page number and (optionally) the page count
Android - A ViewPager page indicator that displays the current page number and (optionally) the page count

NumericPageIndicator A ViewPager page indicator that displays the current page number and (optionally) the page count. It can also display buttons to

Releases(1.25)
Owner
Kshitij Jain
Android Engineer, Tech Lover and A Foodie 😄
Kshitij Jain
ViewPagers library for Android

freepager Ready-to-use view pagers for your project. Based on Swipes navigation demo repository Usage: Gradle: dependencies { compile 'pro.alexza

Alex Zaitsev 460 Nov 25, 2022
Android library for fluid tablayout animation as seen on Snapchat.

SnapTabLayout Show some ❤️ and star the repo to support the project This library is the implementation of TabLayout as seen on popular messaging app S

Niranjan Kurambhatti 714 Dec 25, 2022
Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock.

Android ViewPagerIndicator Paging indicator widgets that are compatible with the ViewPager from the Android Support Library to improve discoverability

Jake Wharton 10.2k Jan 5, 2023
Android LiquidSwipe Library

Android LiquidSwipe Library

Chrisvin Jem 838 Dec 29, 2022
Android Concentric Onboarding library

Android Concentric Onboarding library

Chrisvin Jem 50 Sep 13, 2022
A Material Design ViewPager easy to use library

MaterialViewPager Material Design ViewPager easy to use library Sample And have a look on a sample Youtube Video : Youtube Link Download In your modul

Florent CHAMPIGNY 8.2k Dec 29, 2022
Pixplicity 915 Nov 8, 2022
Library for Sliding Tab With Color Icons!

Sliding Tab With Color Icons Sliding Tab With Color Icons! Kindly use the following links to use this library: In build.gradle (Project) allprojects {

Prabhakar Thota 35 Jan 22, 2022
A simple app that consumes The Ricky & Morty API to display the tv show characters, was trying to learn about pagination with the paging 3 library

Ricky&MortyAPIDemo A simple app that consumes The Rick and Morty API which is a REST and GraphQL API based on the television show Rick and Morty. I wa

Joel Kanyi 9 Jul 12, 2022
LiquidSwipe is a ViewPager library that can be used to make Awesome Onboarding designs.

LiquidSwipe LiquidSwipe is a ViewPager library that can be used to make Awesome Onboarding designs. Usage Set up the dependency Add the mavenCentral()

Farham Hosseini 4 Nov 5, 2021