-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
  • 3,889
  • 12
  • 24
  • 35
roshanR
  • 9
  • 2

2 Answers2

0

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

double-beep
  • 3,889
  • 12
  • 24
  • 35
Maksym V.
  • 2,491
  • 13
  • 24
0

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