Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/IntruderShanky/Flare
Flare provide the easy implementation of circular indicator with ViewPager. (ViewPager Indicator)
https://github.com/IntruderShanky/Flare
circular-indicator islabs viewpager-indicator
Last synced: about 1 month ago
JSON representation
Flare provide the easy implementation of circular indicator with ViewPager. (ViewPager Indicator)
- Host: GitHub
- URL: https://github.com/IntruderShanky/Flare
- Owner: IntruderShanky
- License: apache-2.0
- Created: 2016-10-16T16:17:22.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-26T06:21:26.000Z (about 8 years ago)
- Last Synced: 2024-08-02T01:24:03.246Z (4 months ago)
- Topics: circular-indicator, islabs, viewpager-indicator
- Language: Java
- Size: 5.29 MB
- Stars: 63
- Watchers: 3
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-android-ui - Flare - 简单的循环指示器实现 (轮播图)
README
# Flare
Flare provide the easy implementation of circular indicator with ViewPager. (ViewPager Indicator)[![](https://jitpack.io/v/IntruderShanky/Flare.svg)](https://jitpack.io/#IntruderShanky/Flare)
[Demo App - IS Library](https://play.google.com/store/apps/details?id=com.intrusoft.islibrarydemo)
# Preview
![Screenshot](flare.gif)# Usage
Step 1. Add the JitPack repository to your build file
```groovy
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```
Step 2. Add the dependency
```groovy
dependencies {
compile 'com.github.IntruderShanky:Flare:1.0.2'
}
```
# Implementation
###XML Implementation:
```xml
```
###Attributes
####Indicator Color
```xml
flare:indicator_color="@color/indicator_color"
```
####Indicator Gap
Distance between the centers of two indicators
```xml
flare:indicator_gap="20dp"
```###Java Implementation:
```java
Flare indicator = (Flare) findViewById(R.id.indicator);
ViewPager pager = (ViewPager) findViewById(R.id.pager);//setting Adapter
pager.setAdapter(new PagerAdapter() /* Your PagerAdapter */);//setting PageChangeListener
pager.addOnPageChangeListener(this /* OnPageChangeListener */);//setting Flare
indicator.setUpWithViewPager(pager);
indicator.addOnPageChangeListener(this /* OnPageChangeListener */);//Customize Flare
indicator.setIndicatorColor(Color.BLUE);
indicator.setIndicatorGap(20);
```
#Licence
```
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 athttp://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.
```