make recycler view non scrollable

Java
//Override your LayoutManager's canScrollVertically::boolean
linearLayoutManager = new LinearLayoutManager(context) {
 @Override
 public boolean canScrollVertically() {
  return false;
 }
};
Source

Also in Java: