danoz73 / recyclerviewfastscroller Goto Github PK
View Code? Open in Web Editor NEWA Fast Scroller for the RecyclerView world!
License: Other
A Fast Scroller for the RecyclerView world!
License: Other
My data in my adapter is empty when the view is loaded and I get the following exception.
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewParent android.view.View.getParent()' on a null object reference
at android.support.v7.widget.RecyclerView.getChildViewHolder(RecyclerView.java:2567)
at xyz.danoz.recyclerviewfastscroller.calculation.progress.VerticalLinearLayoutManagerScrollProgressCalculator.calculateScrollProgress(VerticalLinearLayoutManagerScrollProgressCalculator.java:29)
at xyz.danoz.recyclerviewfastscroller.AbsRecyclerViewFastScroller.onLayout(AbsRecyclerViewFastScroller.java:202)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
The problem is in VerticalLinearLayoutManagerScrollProgressCalculator:
@Override
public float calculateScrollProgress(RecyclerView recyclerView) {
LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
int lastFullyVisiblePosition = layoutManager.findLastCompletelyVisibleItemPosition();
View visibleChild = recyclerView.getChildAt(0);
ViewHolder holder = recyclerView.getChildViewHolder(visibleChild);
There is no child at index 0.
This method should handle the case when the RecyclerView has no children, such as when there is not yet any data.
Would u add position offset on the indicator?
https://www.youtube.com/watch?v=8PEc0yUjvII
https://www.youtube.com/watch?v=iywKob92oLY
https://www.youtube.com/watch?v=0rnUOYkUHwk
Hi!
I use RecycleView 22.2.1 version and get fatal exception after attemting to set my RecycleView to VerticalRecyclerViewFastScroller via method setRecyclerView.
Here's the exception:
java.lang.NullPointerException: Attempt to invoke virtual method 'void xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller.setRecyclerView(android.support.v7.widget.RecyclerView)' on a null object reference
It seems like the same problem as #21
And I have another question. Method setOnScrollListener is deprecated now. Should I use addOnScrollListener instead? Is it compatible with your implementation of fast scroll?
Btw, thnx a lot for your lib )
as the title says.
Any help will be highly appreciated!
does it support auto hide when user stop scrolling?
This is a feature enhancement request.
I didn't test but couldn't this
@Override
public float calculateScrollProgress(RecyclerView recyclerView) {
LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
int lastFullyVisiblePosition = layoutManager.findLastCompletelyVisibleItemPosition();
View visibleChild = recyclerView.getChildAt(0);
if (visibleChild == null) {
return 0;
}
ViewHolder holder = recyclerView.getChildViewHolder(visibleChild);
int itemHeight = holder.itemView.getHeight();
int recyclerHeight = recyclerView.getHeight();
int itemsInWindow = recyclerHeight / itemHeight;
int numItemsInList = recyclerView.getAdapter().getItemCount();
int numScrollableSectionsInList = numItemsInList - itemsInWindow;
int indexOfLastFullyVisibleItemInFirstSection = numItemsInList - numScrollableSectionsInList - 1;
int currentSection = lastFullyVisiblePosition - indexOfLastFullyVisibleItemInFirstSection;
return (float) currentSection / numScrollableSectionsInList;
}
be replaced with this?
public float calculateScrollProgress(RecyclerView recyclerView) {
float scrollOffset = recyclerView.computeVerticalScrollOffset();
float scrollRange = recyclerView.computeVerticalScrollRange();
float scrollExtent = recyclerView.computeVerticalScrollExtent();
return scrollOffset / (scrollRange - scrollExtent);
}
Getting an error when adding compile 'xyz.danoz:recyclerviewfastscroller:0.1.3' into dependency section of build.gradle.
Error:A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not find com.android.support:recyclerview-v7:22.1.0.
Required by:
XXX:app:unspecified
XXX:app:unspecified > xyz.danoz:recyclerviewfastscroller:0.1.3
Could not find com.android.support:support-v4:22.1.0.
Required by:
XXX:app:unspecified > xyz.danoz:recyclerviewfastscroller:0.1.3
I have used code as follow, but I don't able to see the character in bubble.
In JavaFile:
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.rvAddColorMarkUserLists);
VerticalRecyclerViewFastScroller fastScroller =(VerticalRecyclerViewFastScroller) findViewById(R.id.fast_scroller);
SectionTitleIndicator sectionTitleIndicator =(SectionTitleIndicator) findViewById(R.id.fast_scroller_section_title_indicator);
fastScroller.setRecyclerView(recyclerView);
recyclerView.setAdapter(usersAdapter);
recyclerView.setItemAnimator(new DefaultItemAnimator());
// Connect the scroller to the recycler (to let the recycler scroll the scroller's handle)
// Connect the section indicator to the scroller
fastScroller.setSectionIndicator(sectionTitleIndicator);
recyclerView.setOnScrollListener(fastScroller.getOnScrollListener());
setRecyclerViewLayoutManager(recyclerView);
In xml file
<android.support.v7.widget.RecyclerView
android:id="@+id/rvAddColorMarkUserLists"
style="@style/recyclerViewListView"
android:visibility="visible"
android:paddingTop="10dp" />
<xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller
android:id="@+id/fast_scroller"
android:layout_width="24dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:paddingRight="@dimen/margin_small"
android:paddingEnd="@dimen/margin_small"
recyclerviewfastscroller:rfs_barColor="@color/white"
recyclerviewfastscroller:rfs_handleBackground="@drawable/fast_scroller_handle_rounded"
/>
<xyz.danoz.recyclerviewfastscroller.sectionindicator.ui.ColorGroupSectionTitleIndicator
android:id="@+id/fast_scroller_section_title_indicator"
android:layout_width="wrap_content"
android:layout_height="@dimen/list_item_height"
android:layout_toLeftOf="@id/fast_scroller"
android:layout_toStartOf="@id/fast_scroller"
recyclerviewfastscroller:rfs_backgroundColor="@color/red"
recyclerviewfastscroller:rfs_textColor="@android:color/white"
/>
This is a feature enhancement request.
I keep getting this exception:
java.lang.NullPointerException: Attempt to invoke interface method 'float xyz.danoz.recyclerviewfastscroller.calculation.progress.TouchableScrollProgressCalculator.calculateScrollProgress(android.support.v7.widget.RecyclerView)' on a null object reference
at xyz.danoz.recyclerviewfastscroller.AbsRecyclerViewFastScroller$1.onScrolled(AbsRecyclerViewFastScroller.java:185)
at android.support.v7.widget.RecyclerView.notifyOnScrolled(RecyclerView.java:3248)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2229)
I've used Eclipse since for some reason I can't import the project using Android-Studio (wrote about it here: #19 ) .
i've got an indexOutOfBound in AbsRecyclerViewFastScroller$override.updateSectionIndicator, after tracing your code, i've seen position that came to the updateSectionIndicator
is bigger than size of my list, i've add following part of code :
if (section < 0 || section >= sections.length) {
return;
}
so updateSectionIndicator
will be :
private void updateSectionIndicator(int position, float scrollProgress) {
if (mSectionIndicator != null) {
mSectionIndicator.setProgress(scrollProgress);
if (mRecyclerView.getAdapter() instanceof SectionIndexer) {
SectionIndexer indexer = ((SectionIndexer) mRecyclerView.getAdapter());
int section = indexer.getSectionForPosition(position);
Object[] sections = indexer.getSections();
if (section < 0 || section >= sections.length) {
return;
}
mSectionIndicator.setSection(sections[section]);
}
}
}
error fixed with this code, please fix this in next update. thanks for your great library.
This might be a small issue but I'm not able to get past this. My fragment gives a null pointer exception like- Attempt to invoke virtual method 'android.support.v7.widget.RecyclerView$LayoutManager android.support.v7.widget.RecyclerView.getLayoutManager()' on a null object reference
This is my onCreateView of the fragment -
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.list, container, false);
RecyclerView songRecyclerView = (RecyclerView) view.findViewById(R.id.list);
songRecyclerView.addItemDecoration(new BackgroundDecoration(Themes.getBackgroundElevated()));
songRecyclerView.addItemDecoration(new DividerDecoration(getActivity()));
int paddingH =(int) getActivity().getResources().getDimension(R.dimen.global_padding);
view.setPadding(paddingH, 0, paddingH, 0);
songRecyclerView.setAdapter(new Adapter());
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
songRecyclerView.setLayoutManager(layoutManager);
VerticalRecyclerViewFastScroller fastScroller = (VerticalRecyclerViewFastScroller) view.findViewById(R.id.fast_scroller);
fastScroller.setRecyclerView(songRecyclerView);
songRecyclerView.addOnScrollListener(fastScroller.getOnScrollListener());
return view;
}
I can't figure out what is going wrong. Any ideas how to fix this minor issue?
when you scroll quickly down the indicator starts to show wrong data ,
android.view.InflateException:
Binary XML file line #25: Binary XML file line #25: Error inflating class xyz.danoz.recyclerviewfastscroller.sectionindicator.title.SectionTitleIndicator
....etc...
....etc...
....etc...
Caused by: android.view.InflateException: Binary XML file line #25: Error inflating class xyz.d
Does anyone know why exactly I'm getting this error?
I've imported the library correctly in gradle and it has no problem inflating / finding the "recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller"
But it won't find the sectionindicator in the class
it seems that method VerticalRecyclerViewFastScroller::onCreateScrollProgressCalculator take wrong values for BoundsProvider. To get scroll progress rendered correctly I overwrote VerticalRecyclerViewFastScroller::onCreateScrollProgressCalculator with the following:
VerticalScrollBoundsProvider boundsProvider = new VerticalScrollBoundsProvider(
mHandle.getHeight(), mBar.getHeight() - mBar.getY() - 2 * mHandle.getHeight()
);
instead of (which is in VerticalRecyclerViewFastScroller::onCreateScrollProgressCalculator : line 59)
new VerticalScrollBoundsProvider(
mBar.getY(), mBar.getY() + mBar.getHeight() - mHandle.getHeight()
);
Regards,
Victor
java.lang.NullPointerException
at android.support.v7.widget.RecyclerView.getChildViewHolder(RecyclerView.java:2567)
at xyz.danoz.recyclerviewfastscroller.calculation.progress.VerticalLinearLayoutManagerScrollProgressCalculator.calculateScrollProgress(VerticalLinearLayoutManagerScrollProgressCalculator.java:29)
at xyz.danoz.recyclerviewfastscroller.AbsRecyclerViewFastScroller.onLayout(AbsRecyclerViewFastScroller.java:202)
at android.view.View.layout(View.java:14905)
at android.view.ViewGroup.layout(ViewGroup.java:4601)
at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
at android.view.View.layout(View.java:14905)
at android.view.ViewGroup.layout(ViewGroup.java:4601)
at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
at android.view.View.layout(View.java:14905)
at android.view.ViewGroup.layout(ViewGroup.java:4601)
at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1594)
at android.view.View.layout(View.java:14905)
at android.view.ViewGroup.layout(ViewGroup.java:4601)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1694)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1552)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
at android.view.View.layout(View.java:14905)
at android.view.ViewGroup.layout(ViewGroup.java:4601)
at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
at android.view.View.layout(View.java:14905)
at android.view.ViewGroup.layout(ViewGroup.java:4601)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1694)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1552)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
at android.view.View.layout(View.java:14905)
at android.view.ViewGroup.layout(ViewGroup.java:4601)
at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
at android.view.View.layout(View.java:14905)
at android.view.ViewGroup.layout(ViewGroup.java:4601)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1694)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1552)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
at android.view.View.layout(View.java:14905)
at android.view.ViewGroup.layout(ViewGroup.java:4601)
at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
at android.view.View.layout(View.java:14905)
at android.view.ViewGroup.layout(ViewGroup.java:4601)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2213)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2027)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1237)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5162)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791)
at android.view.Choreographer.doCallbacks(Choreographer.java:591)
at android.view.Choreographer.doFrame(Choreographer.java:561)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5317)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Please help.
First, I think this library is superb, because many Android developers desire fast scrolling feature for RecyclerView. However, it's not handy to use this library from other app project, and still a bit buggy for now...
I suggest that package this library as a library module and present on the Android Arsenal site as soon as possible. If this library becomes more famous, hopefully developers will contribute 😄
as the title says.
Layouts that readjust height will leave the scroll view bounds in the original state
Hi ...
Well, I'm not sure if it's an issue or my error, but I want to use CoordinatorLayout in my layout, and when using the FastScroller, it appears in the left side, instead of the right side.
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="jahirfiquitiva.iconshowcase.activities.SearchActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="@dimen/toolbar_elevation"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/searchGrid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:fitsSystemWindows="true"
android:scrollbars="none"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller
android:id="@+id/fast_scroller"
android:layout_width="16dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
/>
</android.support.design.widget.CoordinatorLayout>
And 2 things that I would like you to help me fix and/or for you to improve the lib.
Thank you.
It is fairly easy to get this in a state where you scroll very quickly downwards, but your finger leaves the screen before the scroll handle reaches the bottom.
@danoz73 @h6ah4i
This really is great library, but it lacks a proper documentation. And hence adding it into the project is simple, but further it's uncharted territory moreover the issues are also not provided with answers as most of my problems are already asked.
I hope you guys update the stuff, I'll to try my best to understand the usage & update the documentation
Documentation should contain informations about SectionIndexer in Adapter for SectionIndicators.
Hey, I was hoping to fix up the performance of my list by not loading images if the Fast Scroller is active, but I can't seem to find a way to determine when that happens!
In the RecyclerView.OnScrollListener I'm using, onScrolled
does fire, but it doesn't give me enough information to tell when a scroll is occurring, just when a scroll has happened. onScrollStateChanged
does NOT fire with the new state when the Fast Scroller is active! It looks like this is a bug in RecyclerView itself: https://stackoverflow.com/questions/27819507/recyclerview-scrolltoposition-not-trigger-scrolllistener)
...but would there be a way to add a workaround specific to this library? Like being able to listen for when a user grabs the fast scroll handle? Or a new FastScrollListener
that uses that event?
Thanks so much for this library!
It would be great if this library supports RTL layout behaves like the Contacts app.
I keep getting this error when trying to import the project into Android-Studio:
Error:No such property: OSSRH_USERNAME for class: org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer
What is this? How can I fix this?
I think the current section indicator animation is too slow especially when it shows up. The Contacts app's indicator shows up almost immediately.
It would be better if we can adjust the duration of the show / hide animations separately.
I updated to the latest recyclerview and sdk and started getting the error below, but downloaded the code and seem to be getting the same error from the sample, not sure what the cause is except that there seems to be an issue with a scroll event being initiated before the "calculator" is created by the onLayout(), I made a hack to fix it by checking if it had been created before calling it and everything works fine.
03-15 21:12:59.157 3304-3304/xyz.danoz.recyclerviewfastscroller.sample E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: xyz.danoz.recyclerviewfastscroller.sample, PID: 3304
java.lang.NullPointerException: Attempt to invoke interface method 'float xyz.danoz.recyclerviewfastscroller.calculation.progress.TouchableScrollProgressCalculator.calculateScrollProgress(android.support.v7.widget.RecyclerView)' on a null object reference
at xyz.danoz.recyclerviewfastscroller.AbsRecyclerViewFastScroller$1.onScrolled(AbsRecyclerViewFastScroller.java:185)
at android.support.v7.widget.RecyclerView.notifyOnScrolled(RecyclerView.java:3248)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2229)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:2415)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
Support of Android's standard SectionIndexer would allow existing code to be easily migrated to use the RecyclerView and RecyclerViewFastScroller.
If recyclerview adapter does not implement android.widget.SectionIndexer then title indicator won't work.
The title pretty explains it.
java.lang.ArithmeticException: divide by zero
at xyz.danoz.recyclerviewfastscroller.calculation.progress.VerticalLinearLayoutManagerScrollProgressCalculator.calculateScrollProgress(VerticalLinearLayoutManagerScrollProgressCalculator.java:32)
at xyz.danoz.recyclerviewfastscroller.AbsRecyclerViewFastScroller.onLayout(AbsRecyclerViewFastScroller.java:202)
the FastScrollerTouchListener doesn't manage the ACTION_CANCEL event as a discard event.
If the VerticalRecyclerViewFastScroller is inside a ViewPager, a swipe started on the view will first show the SectionTitleIndicator and then leave it visible when the ViewPager starts to swipe the page.
Hi. I noticed the example app has a small problem with screen rotation. After screen rotated, the RecyclerView contents keep scrolled position but the fast scroller handle position is reset to the top of the screen.
How do we reverse it?
I've already tried the following but it's not working
// ...
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
linearLayoutManager.setReverseLayout(true);
linearLayoutManager.setStackFromEnd(true);
recyclerView.setLayoutManager(linearLayoutManager);
// ...
When I put RecyclerViewFastScroller inside android.support.v4.widget.SwipeRefreshLayout, I find RecyclerViewFastScroller disappear. Does anyone have the same issue as mine?
I'm trying to implements the FastScroller component but it didn't work because of a NullPointerException, below the stackStrace :
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewParent android.view.View.getParent()' on a null object reference
at android.support.v7.widget.RecyclerView.getChildViewHolder(RecyclerView.java:2567)
at xyz.danoz.recyclerviewfastscroller.calculation.progress.VerticalLinearLayoutManagerScrollProgressCalculator.calculateScrollProgress(VerticalLinearLayoutManagerScrollProgressCalculator.java:29)
at xyz.danoz.recyclerviewfastscroller.AbsRecyclerViewFastScroller.onLayout(AbsRecyclerViewFastScroller.java:202)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
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:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2072)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1829)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
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 android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Any solution ?
I got this error when using this library:
05-27 00:09:02.547: E/AndroidRuntime(3145): java.lang.NoClassDefFoundError: Failed resolution of: Lxyz/danoz/recyclerviewfastscroller/R$styleable;
Here is my layout:
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rv_list_events"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller
android:id="@+id/fast_scroller"
android:layout_width="100dp"
android:layout_height="match_parent"
/>
If the recyclerview has less items (say 2 items) , the scroller still shows with its position at the bottom. Tried with your example too . Same results . Ideally the scroller should show only when no of items in recyclerview > last visible position . Can you tell me how to solve this?
When using this library with FancyButton
,
as you may know it will show me the error that attribute already been defined...
so, the good habit when define an attribute is adding a unique prefix.
Hi. I want to use this library in my product, but the product have to support API 9 or later.
I've already forked this library and modified to work with gingerbread devices. (Not PR yet, because this modification requires other PR have to be merged before)
https://github.com/h6ah4i/RecyclerViewFastScroller/tree/support_api_level_9
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.