edsilfer / sticky-index Goto Github PK
View Code? Open in Web Editor NEWA library that provides the sticky-index and fast-scroller capabilities to your Android App
License: Apache License 2.0
A library that provides the sticky-index and fast-scroller capabilities to your Android App
License: Apache License 2.0
Binary XML file line #62: Binary XML file line #62: Error inflating class com.ormatheapp.layout.FastScroller
I had this problem. I talked about the issue in issue #21. Here is my fork which works the exact same except for some error handling if the library is given improper data from the user, and some minor style limitations: implementation 'com.github.shmueldabomb441:sticky-index:12504622da'
. See the discussion there for the limitations.
Hi @edsilfer
I noticed that if the user scrolls fast, the fading of some section titles doesn't have the time to update its alpha value : it stays a bit faded or even completely transparent. It seems to happen only for sections with one item, regardless of their position in the list. This bug was also present on the previous version of the library.
Here are two examples :
'J' and 'K' are faded
'D' is invisible and 'G' is faded
Here is an example project : http://www.mediafire.com/file/15xbax4y2mk9wjv/MyApplication.zip
Do you have any idea how to fix this behavior ?
Adding sticky-index to a project causes the error 'Failed to resolve'. It seems related to the fact, that the project is named sticky-index
and the metadata file refers to the name stickyindex
.
.
Hi @edsilfer ,
Thank you for developing this library.
I'm using the libary along with Search Funtionality, whenever the list count is 0.
I'm getting the following IllegalStateException
java.lang.IllegalStateException: firstVisibleView must not be null
Anyway of fixing around this ?
Let me know if any other details are required.
StackTrace :
04-21 22:38:01.038 1893-1893/E/AndroidRuntime: FATAL EXCEPTION: main
PID: 1893
java.lang.IllegalStateException: firstVisibleView must not be null
at br.com.stickyindex.view.StickyIndexLayoutManager.synchronizeScrolls(StickyIndexLayoutManager.kt:31)
at br.com.stickyindex.view.StickyIndexLayoutManager.update(StickyIndexLayoutManager.kt:41)
at br.com.stickyindex.view.StickyIndex$bindRecyclerView$1.onScrolled(StickyIndex.kt:68)
at android.support.v7.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:4844)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:3909)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3540)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4082)
at android.view.View.layout(View.java:19692)
at android.view.ViewGroup.layout(ViewGroup.java:6057)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791)
at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1780)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1546)
at android.view.View.layout(View.java:19692)
at android.view.ViewGroup.layout(ViewGroup.java:6057)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1544)
at android.view.View.layout(View.java:19692)
at android.view.ViewGroup.layout(ViewGroup.java:6057)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:19692)
at android.view.ViewGroup.layout(ViewGroup.java:6057)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1544)
at android.view.View.layout(View.java:19692)
at android.view.ViewGroup.layout(ViewGroup.java:6057)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:19692)
at android.view.ViewGroup.layout(ViewGroup.java:6057)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1544)
at android.view.View.layout(View.java:19692)
at android.view.ViewGroup.layout(ViewGroup.java:6057)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:759)
at android.view.View.layout(View.java:19692)
at android.view.ViewGroup.layout(ViewGroup.java:6057)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2515)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2224)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1410)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6834)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:966)
at android.view.Choreographer.doCallbacks(Choreographer.java:778)
at android.view.Choreographer.doFrame(Choreographer.java:713)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6809)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Is there any particular good reason?
You might want to change it to as low as posible.
I think there is no purpose for allowBackup="true" in library's manifest? There is no way to build project if main project has allowBackup="false".
I have trouble importing the library in my project. It seems that there are conflicts between some support libraries versions and I can't find a way to fix it. I tried switching to version 27.0.2 but it didn't change anything even after a clean build.
implementation "com.android.support:appcompat-v7:27.1.0"
implementation "com.android.support:support-v4:27.1.0"
implementation "com.android.support:design:27.1.0"
implementation "com.android.support:recyclerview-v7:27.1.0"
implementation 'com.github.edsilfer:sticky-index:1.3.0'
Error message :
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.0, 27.0.2. Examples include com.android.support:recyclerview-v7:27.1.0 and com.android.support:animated-vector-drawable:27.0.2
Tools versions :
Android Studio 3.0.1
Gradle Tools 3.0.1
Why Cannot resolve method .setReferenceList(indexList); ?
First of all, great library!
There seem to be a problem with rowHeight larger than 70dp. The indices seem to be misplaced and laggy, or "jumpy"
It says :
"The project 'stickey-index' is not a Gradle-based project."
Please fix this.
Also, btw, you can put on gradle/maven by using this: https://jitpack.io/ . Someone wrote me about this from my library: AndroidDeveloperLB/MaterialPreferenceLibrary#4
Hi @edsilfer
The previous index overlaps the newindex on calling stickyIndex.refresh(indexes);
It previous index hides when I scroll the list. Am I doing anything wrong here.
Note : I've only used the StickIndex in my implementation & not used the Fast Scroller.
PFA Screenshot
#cannot import br.com.stickyindex.sample.databinding.ContactsViewBinding. Gave up in the end this seems to be the hardest lib ive ever tried to integrate. Mostly due to kotlin hell.
Hello, I'm using your lib.
First at all, thanks for your great work for this lib.
My issues:
I'm using maven and trying integrate your lib by your demo project, but there are some functions are not available:
indexContainer.setOnScrollListener(mRecyclerView); => setOnScrollListener is not available
indexContainer.subscribeForScrollListener(fastScroller); => subscribeForScrollListener is not available
fastScroller.setRecyclerView(mRecyclerView);
fastScroller.setStickyIndex(indexContainer.getStickyIndex()); => indexContainer.getStickyIndex() is not available
Also function public void update(params) on FastScroller.java have diff signature.
Can you help me to solve above issue or any update of demo project?
Could not GET 'https://jitpack.io/com/github/edsilfer/android-toolkit/master-SNAPSHOT/maven-metadata.xml'. Received status code 401 from server: Unauthorized
Could not resolve all files for configuration ':demo:debugCompileClasspath'.
Could not resolve com.github.edsilfer:android-toolkit:master-SNAPSHOT.
Required by:
project :demo
project :demo > project :library
Could not resolve com.github.edsilfer:android-toolkit:master-SNAPSHOT.
> Unable to load Maven meta-data from https://jitpack.io/com/github/edsilfer/android-toolkit/master-SNAPSHOT/maven-metadata.xml.
> Could not get resource 'https://jitpack.io/com/github/edsilfer/android-toolkit/master-SNAPSHOT/maven-metadata.xml'.
> Could not GET 'https://jitpack.io/com/github/edsilfer/android-toolkit/master-SNAPSHOT/maven-metadata.xml'. Received status code 401 from server: Unauthorized
This is a blocker to run the APP
text color is not working.
<br.com.stickyindex.StickyIndex
android:id="@+id/sticky_index_container_filter_by_league"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#FFFFFF"
android:layout_marginTop="@dimen/dp72"
android:rowHeight="@dimen/dp7" />
I tried your stickyindex implementation with an empty or one element list and got the exception below. It think it's related to the references to 'indexList.getChildAt(0)' and 'indexList.getChildAt(1)' in IndexLayoutManager
.
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference
at br.com.stickyindex.layout.IndexLayoutManager.update(IndexLayoutManager.java:57)
at br.com.stickyindex.listener.IndexScrollListener.notifySubscribers(IndexScrollListener.java:43)
at br.com.stickyindex.listener.IndexScrollListener.onScrolled(IndexScrollListener.java:26)
at android.support.v7.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:3630)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2784)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:2971)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:562)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1626)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.support.design.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1000)
at android.support.design.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:710)
at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42)
at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:982)
at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:723)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:907)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
at android.view.View.layout(View.java:15671)
at android.view.ViewGroup.layout(ViewGroup.java:5038)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2086)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1843)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at andr
Hello,
I just update Android studio today(Gradle to 2.8), after update I cant resolve sticky-index any more.
This is error from Android studio:
Failed to resolve: com.github.edsilfer:sticky-index:1.2.1
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.