chahine / pageindicator Goto Github PK
View Code? Open in Web Editor NEWAn Instagram like page indicator compatible with RecyclerView and ViewPager.
License: MIT License
An Instagram like page indicator compatible with RecyclerView and ViewPager.
License: MIT License
at com.chahinem.pageindicator.PageIndicator$animateDots$$inlined$let$lambda$1.onAnimationUpdate(PageIndicator.kt:193)
at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1350)
at android.animation.ValueAnimator.animateBasedOnTime(ValueAnimator.java:1262)
at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1310)
at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
at android.animation.AnimationHandler.-wrap2(AnimationHandler.java)
at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:872)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:618)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6186)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
I want to swipe recycler reverse in initial state. But pager dots don't move when swiping to the right.
Not compatible with viewpager? waiting RecyclerView?
pageIndicator.attachTo(viewpager);
Caused by: java.lang.IllegalArgumentException: count expected to be > 0, actual: 0
at com.chahinem.pageindicator.DotManager.<init>(DotManager.kt:19)
at com.chahinem.pageindicator.PageIndicator.setCount(PageIndicator.kt:50)
at com.chahinem.pageindicator.PageIndicator.onRestoreInstanceState(PageIndicator.kt:138)
View throw exception when restore satate with empty ViewPager
Hello
i am using your awesome library in one of my projects and i have discover the following bug
Having a viewpager inside a recyclerview.
I'm overiding the onViewRecycled and i save in a HashMap what item was visible in the viewpager at that recyclerview position.
Next time i bind this item again if there is in hashmap i set the correct item to be selected in viewpager.
It works perfect.
The problem is that the indicator is in wrong position.
For example in a viewpager with 3 items i swipe to the last.
After the recycling the viewpager show correctly the last item but the indicator is in position 2.
Consider adding @JvmField
and JvmStatic
the CREATOR field. Or consider using a data
class.
+ @JvmField
+ @JvmStatic
val CREATOR: Parcelable.Creator<SavedState> = object : Parcelable.Creator<SavedState> {
what is the last-version
SavedState onSavedInstanceState is not working on Tablets
The animations are stuttering with a large number of dots.
Need to optimize PageIndicator::animateDots
and PageIndicator::onDraw
If item size is less than 6 then inactive radious count method is crashing
When In Recyclerview, the item added dynamically at any position, it does not stays to that selected position but it moves to first every time and then if I scroll to recyclerview, it goes with wrong position.
Can I have the method to set dot at a specific position?
Hello, thanks for the nice library I have one comment.
I needed to specify the size of the dots, I needed all the dots to be the same size.
I wasn't sure which number (1-6) to use, so I used all of them:
<com.chahinem.pageindicator.PageIndicator
app:piSize1="10dp"
app:piSize2="10dp"
app:piSize3="10dp"
app:piSize4="10dp"
app:piSize5="10dp"
app:piSize6="10dp"/>
This works, but I think that the you could improve your API to make it doable with 1 property/method, since this seems (to me, i might be wrong) like the most common use case.
Avoid creating the full-sized array in DotManager.dots: ByteArray
.
Currently, the PageIndicator class is final. This makes using a default theme for all PageIndicator instances very hard, using a style attrib.
Would it be possible to make that class non final?
Hi,
I experienced a bug when I put 30s items to the list. At first, it seemed nothing went wrong, but then I realized sometimes there is an extra dot on the first or last item.
Steps :
I think supporting RTL languages should be simple
Hy,
Is it possible to have an upgrade to access the selectedIndex of the DotManager?
Bye
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.