I\'m stuck with an issue about changing Recycler height based on its total items. What I have tried is to use Layout Param like this:
ViewGroup.Layo
You should use LayoutParams of parent's view in setLayoutParams(params).
For example:
Change LayoutParams in the code.
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, 500); recyclerView.setLayoutParams(lp);