0

I am currently working on an app that I have completed portrait views of everything. This is my first app where I want to have robust orientation support.

So, I'm going through the process of refining the landscape orientation of views. Instead of having a horizontal tab layout on the bottom in the portrait orientation, I would like to present the user with a vertical equivalent of my TabLayout that is hooked up to the ViewPager2 on the right and show the content to the right.

Portrait Mode:

|            |
|   content  |
|            |
|------------|
| tab layout |

Desired landscape mode:

| tab |         |
| lay | content |
| out |         |

I saw another person who faked out the TabLayout by using custom views and changing the orientations by -90. But TabHost may also work?

Is there a "best" or "recommended" way to implement such a different orientation to the user? I obviously want to avoid adding unnecessary code to handling orientations as much as possible.

spamalope
  • 11
  • 1
  • 2
  • check out this link https://stackoverflow.com/a/16567362/3449840 – Sagar Aug 24 '22 at 16:01
  • Thanks Sagar. So the idea is to implement another controller to use in landscape and handle in code respectively. Makes sense. Wish TabLayout could handle either orientation gracefully, but oh well. Thank you again! – spamalope Aug 24 '22 at 16:38
  • Upvote the comment if it helps you. – Sagar Aug 25 '22 at 02:39
  • It did help, thank you again, and I absolutely promise you I will when I finally have 15 rep and am able to upvote your comment. – spamalope Aug 25 '22 at 11:51

0 Answers0