I want to know if there is any possible way to use RecyclerView?
Before this, I used RecyclerView with fixed height inside a
I fully agree with Ashkan solution, big thanks (voted +1!), but there is one thing...
If RecyclerView does scroll correctly inside ScrollView/NestedScrollView BUT it doesn't fling (intercept it) then the solution is to extend RecyclerView and override OnInterceptTouchEvent and OnTouchEvent. If you don't need any click actions but just want to present items with working fling then simply return false in both like below:
public class InterceptingRecyclerView extends RecyclerView {
public InterceptingRecyclerView(Context context) {
super(context);
}
public InterceptingRecyclerView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public InterceptingRecyclerView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent e) {
return false;
}
@Override
public boolean onTouchEvent(MotionEvent e) {
return false;
}
}
Or actually it should be called NonIntercepting... ;) Simple as that.