Comments (8)
Your parent ViewGroup is a ScrollView which is unnecessary since RecyclerView provides scrolling. Try replacing it with a FrameLayout.
Currently the parent ViewGroup must be a FrameLayout or RelativeLayout in order for the FastScroller to be properly displayed on top of the RecyclerView. We plan to add support for CoordinatorLayout and ConstraintLayout in the future.
from fastscroll.
ok. but I got the same if I do next
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.l4digital.fastscroll.FastScrollRecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:bubbleColor="@color/blue_main"
app:bubbleTextColor="#ffffff"
app:handleColor="#999999"
app:hideScrollbar="false"
app:showTrack="true"
app:trackColor="@color/blue_light" />
</FrameLayout>
</ScrollView>
from fastscroll.
What is the error you are seeing? You might need to use NestedScrollView instead of ScrollView.
from fastscroll.
It's not an error. I just cant scroll it. The same if I use NestedScrollView
Please look at gif
from fastscroll.
And I also tried with RecyclerView.setNestedScroll(false)
from fastscroll.
@iRYO400 - The layout shown in your GIF should not need a ScrollView at all. Have you tried removing any parent scrollview so your XML looks like:
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.l4digital.fastscroll.FastScrollRecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:bubbleColor="@color/blue_main"
app:bubbleTextColor="#ffffff"
app:handleColor="#999999"
app:hideScrollbar="false"
app:showTrack="true"
app:trackColor="@color/blue_light" />
</FrameLayout>
from fastscroll.
@Zacharyyy hi!
The gif shows a sample layout. I didn't show that I have another RecyclerView(for friend invites) above FastScrollRecyclerView(list of current friends). Today I've done with the final layout:
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar_stavki"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="56dp">
<android.support.v7.widget.SearchView
android:id="@+id/search_view"
android:layout_width="match_parent"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_marginBottom="16dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginTop="16dp"
android:background="@drawable/searchview_round_bg"
android:gravity="center"
android:queryHint="Search" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview_fragment2"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.l4digital.fastscroll.FastScrollRecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:bubbleColor="@color/blue_main"
app:bubbleTextColor="#ffffff"
app:handleColor="#999999"
app:hideScrollbar="false"
app:showTrack="true"
app:trackColor="@color/blue_light" />
</FrameLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
Code:
adapter = new FriendsAdapter(friendsChildModelList);
binding.recyclerView.setAdapter(adapter);
binding.recyclerView.setNestedScrollingEnabled(true);
binding.recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
adapter2 = new FriendsInvitesAdapter(invitesChildModelList);
binding.recyclerviewFragment2.setAdapter(adapter2);
binding.recyclerviewFragment2.setNestedScrollingEnabled(true);
binding.recyclerviewFragment2.setLayoutManager(new inearLayoutManager(getActivity()));
Can you please give any idea how to handle that?
from fastscroll.
There are a couple things that stand out as possible issues.
- You have two RecyclerViews in the same layout with layout_height=match_parent. Are they both vertically scrolling?
- Your layout manager don't specify VERTICAL or HORIZONTAL.
Should look something like:
binding.recyclerviewFragment2.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL/HORIZONTAL, false));
If both of your recyclerviews use VERTICAL orientation then your layout will likely have issues of the views squashing each other. You should only need one vertically scrolling recyclerview with heterogenous layouts.
from fastscroll.
Related Issues (20)
- FastScrollRecyclerView leaks parent view HOT 2
- Scroll the list the thumb never reached to the end when items are less HOT 2
- Bug: no preview of items in layout editor HOT 14
- The listener documentation should be included in the README HOT 1
- Ability To Adjust Handle Size HOT 2
- Bubble not showing on scroll HOT 1
- JCenter is shutting down on May 1st, 2021 HOT 8
- Issue with collapsing toolbar HOT 1
- Ability to disable navigation by touch HOT 1
- FastScrollRecyclerView Error HOT 2
- r
- Convert FastScroll to Kotlin HOT 1
- Add Compose Example HOT 1
- RecyclerView Scrolling doesn't put bubble/handle at bottom HOT 1
- Accidental scroll jumps because of bubble width touch area on whole height HOT 2
- setSectionIndexer visibility HOT 1
- collapsible toolbar not collapsing HOT 1
- Thickness of the thumb and customizable drawable thumb HOT 1
- RecyclerView shows handle when Filterable returns an empty list
- Click on scroll track should be disabled when when showTrack="false"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastscroll.