1

I am having a requirement with viewpager2 where on a portrait I need to show 1 full card and on the landscape, I need to make it 2 along with a showing of the previous and next card boundaries. How Can I achieve it as it was easier to implement with viewpager but viewpager2 is not able to do?

Please suggest some workable solutions or alternatives to getPageWidth() we had in the pager where based on device orientation used to set page width size

Also, Page transforms margin and offset do not work until I am scrolling through the pager item The attached image is for portrait mode 1 full card whereas in the landscape I need 2 full card Viewpager in potrait,

Ravi
  • 2,277
  • 3
  • 22
  • 37
  • Does this answer your question? [Android ViewPager2 setPageMargin unresolved](https://stackoverflow.com/questions/56114430/android-viewpager2-setpagemargin-unresolved) – rahat Apr 12 '22 at 12:11
  • No , i am looking for alernative of getPageWidth() – Ravi Apr 12 '22 at 12:16

0 Answers0