All Projects → intik → Overflow Pager Indicator

intik / Overflow Pager Indicator

Licence: mit
Simple paging indicator widget with pager dataset ovewflow effect à la Instagram behavior

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Overflow Pager Indicator

Fillingbutton
🔥Replace typical onLongClickListener with this library!
Stars: ✭ 31 (-77.21%)
Mutual labels:  library, view
Toothyprogress
A polyline determinated ProgressBar written in Kotlin
Stars: ✭ 56 (-58.82%)
Mutual labels:  view, widget
Hhcustomcorner
Awesome library to customize corners of UIView and UIButton. Now you can customize each corner differently
Stars: ✭ 36 (-73.53%)
Mutual labels:  library, view
Iconswitch
🍭 Custom Android Switch widget
Stars: ✭ 874 (+542.65%)
Mutual labels:  view, widget
Panwid
A collection of widgets for urwid.
Stars: ✭ 82 (-39.71%)
Mutual labels:  library, widget
Androidlibs
🔥正在成为史上最全分类 Android 开源大全~~~~(长期更新 Star 一下吧)
Stars: ✭ 7,148 (+5155.88%)
Mutual labels:  library, view
Mindo
Generate mind maps easily in your android app.
Stars: ✭ 52 (-61.76%)
Mutual labels:  library, view
Popview Android
Pop animation with circular dust effect for any view updation
Stars: ✭ 487 (+258.09%)
Mutual labels:  library, view
Calendarview
Calendar View Library
Stars: ✭ 71 (-47.79%)
Mutual labels:  library, view
Fancyaccordionview
An Android fancy accordion view
Stars: ✭ 64 (-52.94%)
Mutual labels:  view, widget
Tabulate
Table Maker for Modern C++
Stars: ✭ 862 (+533.82%)
Mutual labels:  library, view
Bubble Navigation
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+1030.15%)
Mutual labels:  library, widget
Crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (-83.82%)
Mutual labels:  library, view
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-88.97%)
Mutual labels:  library, view
Stepper Touch
Stepper Touch for Android based on MaterialUp submission
Stars: ✭ 621 (+356.62%)
Mutual labels:  library, widget
Speedview
Dynamic Speedometer and Gauge for Android. amazing, powerful, and multi shape ⚡️
Stars: ✭ 1,035 (+661.03%)
Mutual labels:  library, view
Bouncylayout
Make. It. Bounce.
Stars: ✭ 4,035 (+2866.91%)
Mutual labels:  library, view
Weatherview
WeatherView is an Android Library let you make cool weather animations for your app
Stars: ✭ 426 (+213.24%)
Mutual labels:  library, view
Dotsloaderview
Simple dots loader view
Stars: ✭ 63 (-53.68%)
Mutual labels:  library, view
Floatingtoast
Android library to create customizable floating animated toasts like in Clash Royale app
Stars: ✭ 86 (-36.76%)
Mutual labels:  library, view

Overflow Pager Indicator widget

Download license

Simple widget for recycler view - displaying dots indicators of currently selected page - with some fancy animation when dataset is large.

Large dataset displays only fixed amount of dots centered around currently selected page with a nice little scaling animation of indicators on the edges. Provides fluent animation of selecting new page.

Small dataset displays classic dot indicators line with currently selected page highlighted.

RecyclerView should be configured with snapping to pages vie PagerSnapHelper subclass ~ simulates behavior of classic ViewPager

Widget preview

✔️ Overflowed indicators ❌ Classic confusing indicators
Widget effect animation preview Classic

Disclaimer: Having too many pages in recycler means that user needs to swipe a lot. Different layout/ui may be more user friendly.

Usage

Migration to 3.1 from 3.0

dotFillColor and dotStrokeColor were renamed to indicatorFillColor and indicatorStrokeColor

Migration to 3.0 from 2.x

Make sure you have Jitpack dependency in root gradle file.

Follow this instructions to update TransitionsEverywhere which migrated to Jetpack androidx.transition to prevent import crashes.

Gradle dependency

In your root gradle add dependency to Jitpack:

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

In you module gradle add dependency to library:

implementation 'com.github.intik:overflow-pager-indicator:3.1.0'

Layout

Some layout with RecyclerView and OverflowPagerIndicator

<FrameLayout
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   >

   <androidx.recyclerview.widget.RecyclerView
      android:id="@+id/recyclerView"
      android:layout_width="match_parent"
      android:layout_height="120dp"
      />

   <cz.intik.overflowindicator.OverflowPagerIndicator
      android:id="@+id/viewOverflowPagerIndicator"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center_horizontal|bottom"
      app:indicatorFillColor="#FF0000"
      app:indicatorStrokeColor="#0000FF"
      />

</FrameLayout>

Code

Attach OverflowPagerIndicator (usually after LayoutManager and Adapter setup) to RecyclerView - for listening to dataset changes:

viewOverflowPagerIndicator.attachToRecyclerView(recyclerView)

Attach SimpleSnapHelper to recycler view which will change selected page in indicator view as items in recycler view are snapped:

val snapHelper = SimpleSnapHelper(viewOverflowPagerIndicator)
snapHelper.attachToRecyclerView(recyclerView)

Or use any other implementation of PagerSnapHelper or even some custom logic which will call:

viewOverflowPagerIndicator.onPageSelected(position)

Customization

You can easily change dot fill color and dot stroke color via xml attributes like this:

<cz.intik.overflowindicator.OverflowPagerIndicator
    app:indicatorFillColor="#FF0000"
    app:indicatorStrokeColor="@color/heavenlyBlue"
    app:indicatorMargin="6dp"
    app:indicatorSize="22dp"
    />

Changelog

3.1.0 Add customization of indicator size and margin. Unify naming of attributes to "indicatorXxx" instead of "dotXxx"

3.0.1 Remove library from Bintray, use simply Jitpack. Convert library to Kotlin and update to TransitionsEverywhere 2.0 (which uses androidx.transition.X heavily)

2.0.0 Migrate to AndroidX, add color customization options (big thanks Javi Chaqués)

1.2.1 bugfix (thanks Sajad Abasi)

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].