recyclerview禁止滑动

LinearLayoutManager linearLayoutManager =  new  LinearLayoutManager( getActivity(),
      LinearLayoutManager.VERTICAL,  false ) {  

     @Override  
  public boolean canScrollVertically() {  
  return false;  
}  
   };
recyclerview.setLayoutManager(linearLayoutManager);  
recyclerview.setAdapter(tempCommonAdapter);  




LinearLayoutManager  linearLayoutManager = new LinearLayoutManager(context) {
@Override
public boolean canScrollVertically() {
return false;
}
};

你可能感兴趣的:(recyclerview禁止滑动)