I have implemented RecyclerView in my android project, Which was working fine when I was using Android Support Library version 23.0.1.then I had to update my support Library for some other functionality so I updated my Support Library to 23.1.1. Then as libraries were updated I have deleted previous libraries from eclipse and re-import them and added them to project and cleaned workspace. after that I am getting following compile time error "The type android.support.v4.view.ScrollingView cannot be resolved. It is indirectly referenced from required .class files" whereas there is no compile time error in any of the methods which I override from RecyclerView Library.
package com.palasha.tccnetmanager.views;
import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
public class CustomRecyclerView extends RecyclerView {
public CustomRecyclerView(Context context) {
super(context);
}
public CustomRecyclerView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public CustomRecyclerView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public boolean fling(int velocityX, int velocityY) {
LinearLayoutManager linearLayoutManager = (LinearLayoutManager) getLayoutManager();
int firstVisibleView = linearLayoutManager
.findFirstVisibleItemPosition();
if (firstVisibleView != -1)
if (velocityX > 0)
smoothScrollToPosition(firstVisibleView + 1);
else if (firstVisibleView != 0)
smoothScrollToPosition(firstVisibleView - 1);
else
smoothScrollToPosition(0);
return true;
}
}