I want to set Max Height of RecylerView.I am able to set max height using below code.Below code makes height 60% of current screen.
DisplayMetrics displ
write this statements inside if else and let me know ,
ViewGroup.LayoutParams params=recyclerview.getLayoutParams(); params.height=100; recyclerview.setLayoutParams(params);