Recyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested Scrollview
try
recyclerView.setNestedScrollingEnabled(false);
recyclerview inside nested scroll view is not scolling
After many tries, I've found the solution
which is to change the recyclerView
's height to be wrap_content
instead of match_parent
or 0dp
so the recyclerView
would be like this:
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/profile_details_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/default_xxdim"
android:clipToPadding="false"
android:paddingBottom="@dimen/default_dim"
android:paddingStart="@dimen/default_dim"
android:nestedScrollingEnabled="false"
app:layout_constraintBottom_toBottomOf="parent"
android:focusable="false"
app:layout_constraintTop_toBottomOf="@id/profile_name"
/>
Recyclerview inside ScrollView not scrolling smoothly
Try doing:
RecyclerView v = (RecyclerView) findViewById(...);
v.setNestedScrollingEnabled(false);
As an alternative, you can modify your layout using the support design library. I guess your current layout is something like:
<ScrollView >
<LinearLayout >
<View > <!-- upper content -->
<RecyclerView > <!-- with custom layoutmanager -->
</LinearLayout >
</ScrollView >
You can modify that to:
<CoordinatorLayout >
<AppBarLayout >
<CollapsingToolbarLayout >
<!-- with your content, and layout_scrollFlags="scroll" -->
</CollapsingToolbarLayout >
</AppBarLayout >
<RecyclerView > <!-- with standard layoutManager -->
</CoordinatorLayout >
However this is a longer road to take, and if you are OK with the custom linear layout manager, then just disable nested scrolling on the recycler view.
Edit (4/3/2016)
The v 23.2
release of the support libraries now includes a factory “wrap content” feature in all default LayoutManager
s. I didn’t test it, but you should probably prefer it to that library you were using.
<ScrollView >
<LinearLayout >
<View > <!-- upper content -->
<RecyclerView > <!-- with wrap_content -->
</LinearLayout >
</ScrollView >
recyclerview inside nestedscrollview loading slow
I solved the problem using coordinatorlayout/collapsingtoolbar
.
RecyclerView nested in LinearLayout as well as Scrollview not scrolling to specific recycler item position
Why you use the nestedScollView smoothScrollTo with the position you have to give x,y coordonate i think in your case you can use recycleView.smoothScrollToPosition(yourPosition);
Related Topics
Scaling a Phonegap App for Different Android Screen Sizes/Densities
Android App Installation Failed: Package Com.My.App Has No Certificates at Entry Androidmanifest.Xml
Tracking Progress of Multipart File Upload Using Okhttp
Difference Between Android Dimension: Pt and Dp
Why Is 0Dp Considered a Performance Enhancement
How to Update Google Play Services for Android Studio 2.2 Emulators
Not Enough Space to Show Ad (Admob)
Why Did The Listview Repeated Every 6Th Item
Mat (Eclipse Memory Analyzer) - How to View Bitmaps from Memory Dump
Expandablelistview with Viewpager Combination as Its Child
In Android Applications What Is The Role of "R.Java"
Which HTML Tags Are Supported by Android Textview
How to Put Recyclerview Inside Nestedscrollview
How to Make My Layout Able to Scroll Down
How to Programmatically Include Layout in Android
Change Order of Views in Linear Layout Android
CSS Media Queries on Nexus 7, Display Resolution Not Working in Code