Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] android – Change the orientation recyclerview card size change

Posted on November 11, 2022 By

Solution 1 :

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

Solution 2 :

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

Problem :

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:

Comments

Comment posted by Ergin Ersoy

Please add your code so we can see what you did so far.

Comment posted by Ali Rezaiyan

Try to use setHasFixedSize(true) on your recyclerview

Comment posted by Prashanth Verma

Please add your recyclerview and adapter code

Comment posted by Fahad Alotaibi

change the width of the card to match_parent

READ  [FIXED] android - null object reference error on Synthetic Binding from within Class
Powered by Inline Related Posts
Android Tags:android, android-cardview, android-nestedscrollview, android-recyclerview, screen-rotation

Post navigation

Previous Post: [FIXED] java – The Android LoaderManager is deprecated. Now what?
Next Post: [FIXED] android – Is WorkManager the right solution for me?

Related Posts

[FIXED] android – Variable is used by reference when added to Mutable List Android
[FIXED] java – file.listFiles() returns null even though folder exists Android
[FIXED] How to draw this shape in XML for Android? Android
[FIXED] android studio – Custom library module Android
[FIXED] android studio – Change background color (Time is near to up) red for 9, green for 8, etc. (Kotlin) Android
[FIXED] android – How to maintain text padding on EditText when there are multiple lines Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • Can VPN be traced by police?
  • Where were Kaiser-Frazer cars built?
  • How do you make gold rose gold paint?
  • What are the newest type of dentures?
  • Can you wear joggers as dress pants?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme