GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - KshitijDroid/IndicatorView: IndicatorView Library For Android

BranchesTags
Open more actions menu

Latest commit

 

History

30 Commits
30 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
Screenshots
Screenshots
 
 
gradle/wrapper
gradle/wrapper
 
 
indicatorview
indicatorview
 
 
sample
sample
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

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.

About

IndicatorView Library For Android

Topics

androidandroid-librarycarouselindicatorindicatorviewtabsviewviewpagerviewpager-indicator

Resources

Readme
Apache-2.0 license
Activity

Stars

39 stars

Watchers

3 watching

Forks

12 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.