What is widget RecyclerView?
RecyclerView is a powerful UI widget that allows you to display a list of data in a flexible manner.
How to change RecyclerView height dynamically in android?
You should use LayoutParams of parent's view in setLayoutParams(params). Change LayoutParams in the code. I just changed Linearlayout to Relative then it automatically resided.