-2

I have a RecyclerView with GrideLayoutManger. When I rotate the phone, the RecyclerView item card size changes.

How can I solve this problem?

Actual card size before rotating phone:

After rotating the phone:

double-beep
  • 5,031
  • 17
  • 33
  • 41
roshanR
  • 9
  • 2

2 Answers2

0

I believe your items root width is wrap_content, try it with match_parent.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Maksym V.
  • 2,877
  • 17
  • 27
0

Make image size static,In wrap content it cause compress. set fix size to your root view it solve problem.