All Projects → shuhart → Bubblepagerindicator

shuhart / Bubblepagerindicator

Licence: apache-2.0
A view pager indicator view to deal with a large amount of pages.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Bubblepagerindicator

Scrollingpagerindicator
Pager indicator inspired by Instagram. Lightweight and easy to set up.
Stars: ✭ 419 (+229.92%)
Mutual labels:  instagram, viewpager, indicator
Pageindicator
An Instagram like page indicator compatible with RecyclerView and ViewPager.
Stars: ✭ 236 (+85.83%)
Mutual labels:  instagram, viewpager, indicator
Android-Universal-ViewPager-Indicator
Android Universal ViewPager Indicator
Stars: ✭ 41 (-67.72%)
Mutual labels:  viewpager, indicator
ArcPageIndicator
Android Page Indicator for ViewPager with original animations. It uses an ellipse to dispose indication spots, and can draw a hand, like in old elevators.
Stars: ✭ 73 (-42.52%)
Mutual labels:  viewpager, indicator
Ispagecontrol
A page control similar to that used in Instagram
Stars: ✭ 285 (+124.41%)
Mutual labels:  instagram, indicator
MultiIndicator
多功能指示器,适用于ViewPager 多场景
Stars: ✭ 44 (-65.35%)
Mutual labels:  viewpager, indicator
IndicatorView
IndicatorView Library For Android
Stars: ✭ 41 (-67.72%)
Mutual labels:  viewpager, indicator
Cmpagetitleview
✍️一分钟集成类似抖音,新浪微博,腾讯视频,网易新闻,今日头条等常见的标题栏样式,api灵活易扩展,支持Cocoapods和Masonry布局,支持ChildController的完整生命周期
Stars: ✭ 270 (+112.6%)
Mutual labels:  viewpager, indicator
Dotsindicator
Three material Dots Indicators for view pagers in Android !
Stars: ✭ 2,447 (+1826.77%)
Mutual labels:  viewpager, indicator
Viewpagerindicator
一个简单好用的ViewPagerIndicator,提供了六种类型,为viewpager添加酷炫效果,并且支持轮播图( A simple, cool, customizable ViewPagerIndicator.show cool indicator for viewpager , it also good for viewpager as carousel )
Stars: ✭ 366 (+188.19%)
Mutual labels:  viewpager, indicator
Banner
🔥🔥ViewPager,ViewPager2无限轮播功能。自定义Indicator,支持一屏三页,支持仿魅族banner效果。极其简单的使用方式
Stars: ✭ 393 (+209.45%)
Mutual labels:  viewpager, indicator
SimpleSlider
A simple slider allows you to easily use.
Stars: ✭ 78 (-38.58%)
Mutual labels:  viewpager, indicator
Magicindicator
A powerful, customizable and extensible ViewPager indicator framework. As the best alternative of ViewPagerIndicator, TabLayout and PagerSlidingTabStrip —— 强大、可定制、易扩展的 ViewPager 指示器框架。是ViewPagerIndicator、TabLayout、PagerSlidingTabStrip的最佳替代品。支持角标,更支持在非ViewPager场景下使用(使用hide()、show()切换Fragment或使用setVisibility切换FrameLayout里的View等),http://www.jianshu…
Stars: ✭ 8,969 (+6962.2%)
Mutual labels:  viewpager, indicator
Walk-Through-Screen
This library provides easy ways to add onboarding or pager screens with different animation and indicators.
Stars: ✭ 31 (-75.59%)
Mutual labels:  viewpager, indicator
Instagramactivityindicator
Activity Indicator similar to Instagram's.
Stars: ✭ 138 (+8.66%)
Mutual labels:  instagram, indicator
react-native-viewpager-indicator
修改自react-native-scrollable-tab-view,增加了根据文字内容适配下划线长度的功能。
Stars: ✭ 52 (-59.06%)
Mutual labels:  viewpager, indicator
Cardslider
Card Slider is an android component allows you to implement carousel effect with infinite indicators and more features
Stars: ✭ 160 (+25.98%)
Mutual labels:  viewpager, indicator
Bannerviewpager
🚀 An awesome banner view for Android,Based on ViewPager2. 这可能是全网最好用的ViewPager轮播图。简单、高效,一行代码实现循环轮播,一屏三页任意变,指示器样式任你挑。
Stars: ✭ 2,603 (+1949.61%)
Mutual labels:  viewpager, indicator
Loopingviewpager
A ViewPager and PagerAdapter combination that support auto scroll, infinite loop and page indicators.
Stars: ✭ 310 (+144.09%)
Mutual labels:  viewpager, indicator
Inkpageindicator
InkPageIndicator created by @nickbutcher for Plaid https://github.com/nickbutcher/plaid and backported by me for API 14+ (4.0+)
Stars: ✭ 589 (+363.78%)
Mutual labels:  viewpager, indicator

Attention

I'm not going to support this anymore. Just use a better solution, e.g. this one Indefinite-Pager-Indicator

BubblePagerIndicator

A view pager indicator view to deal with a large amount of pages. Nice scale and transition animations are supported.

Sample

Usage

  1. Add mavenCentral() to repositories block in your gradle file.
  2. Add implementation 'com.github.shuhart:bubblepagerindicator:1.2.0' to your dependencies.
  3. Add BubblePageIndicator into your layouts or view hierarchy:
<com.shuhart.bubblepagerindicator.BubblePageIndicator
    android:id="@+id/indicator"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@id/pager"
    android:layout_centerHorizontal="true"
    android:layout_marginBottom="32dp"
    android:layout_marginTop="32dp"
    app:bpi_fillColor="@color/colorAccent"
    app:bpi_pageColor="@color/colorPrimary"
    app:bpi_radius="8dp"
    app:bpi_marginBetweenCircles="6dp"
    app:bpi_onSurfaceCount="@integer/default_bubble_indicator_on_surface_count"
    app:bpi_risingCount="@integer/default_bubble_indicator_rising_count"/>

  1. Attach indicator to the ViewPager instance:
pager = findViewById(R.id.pager);
indicator = findViewById(R.id.indicator);
adapter = new ViewPagerAdapter();
pager.setAdapter(adapter);
indicator.setViewPager(pager);

An adapter should be attached to the ViewPager before calling indicator.setViewPager(pager).

  1. You can customize the behavior in runtime:
indicator.setOnSurfaceCount(3);
indicator.setRisingCount(2);
// resolved color
indicator.setFillColor(ContextCompat.getColor(this, R.color.colorAccent));
// resolved color
indicator.setPageColor(ContextCompat.getColor(this, R.color.colorPrimary));
// in px
indicator.setRadius(getResources().getDimensionPixelSize(R.dimen.default_bubble_indicator_radius));
// in px
indicator.setMarginBetweenCircles(getResources().getDimensionPixelSize(
            R.dimen.default_bubble_indicator_circles_margin));

Customization

Attribute Description Default Value
bpi_pageColor Current page circle color. #FFFFFF
bpi_fillColor Circles color #000000
bpi_radius Normal circle radius. 3dp
bpi_marginBetweenCircles Margin between centers of circles. 3dp
bpi_onSurfaceCount A number of circles with full radius (bpi_radius) 5
bpi_risingCount A number of scaled circles. 2

Maximum number of circles visible to the user is bpi_onSurfaceCount + bpi_risingCount * 2 (Default is 9).
At the beginning only bpi_onSurfaceCount + bpi_risingCount (Default is 7) circles are visible.
Radius for a rising circle is scaled by power of 2 with some correction applied.
In every aspect the library is mimicking the Instagram indicator behavior.

Special thanks

@tree1891 for his help in fixing many annoying issues.

License

Copyright 2017 Bogdan Kornev.

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].