Giter Club home page Giter Club logo

sticky-index's Issues

min sdk version is 23

Is there any particular good reason?
You might want to change it to as low as posible.

Could not resolve com.github.edsilfer:android-toolkit:master-SNAPSHOT.

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.

Fading title issue for sections with only one item

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 ?

Some functions are not available

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?

Sticky Index Overlaps on refreshing Indexes

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

device-2018-04-23-203450

Text Color

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" />

stickyindex expects at least two elements

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

.

.

I am using this library from last 2years and suddenly I am getting this error while running the app -

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

IllegalStateException : When Item Count is 0 on Search Implementation

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)

Versions conflicts with support library

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

Can't use sticky-index with JCenter

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.