版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fengyeNom1/article/details/85601460
package xiaodan.www.amor_love.Utils;
import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
/**
* 设置recyclerview不进行滚送加载(解决与scollview之间的冲突)
* Created by zhuzi on 2017/5/14.
*/
public class MylineaflayoutMager extends LinearLayoutManager {
private boolean isScrollEnabled = true;
public MylineaflayoutMager(Context context) {
super(context);
}
public void setScrollEnabled(boolean flag) {
this.isScrollEnabled = flag;
}
@Override
public boolean canScrollVertically() {
//Similarly you can customize "canScrollHorizontally()" for managing horizontal scroll
return isScrollEnabled && super.canScrollVertically();
}
}