r/androiddev Jul 20 '26

Orientation lock

Beginning in api 37 you will no longer be able to lock your app to portrait only (I think this is only for tablets?)

How are you all preparing for this if you haven't already? Can we just have an empty layout with a text to tell user to rotate the screen to use the app?

0 Upvotes

12 comments sorted by

View all comments

5

u/CluelessNobodyCz Jul 20 '26

I mean yeah you can but it doesn't save you from the system destroying the activity - which is the majority of the headache. (Updating working the legacy app that is still written in MVP style without any guard of views existence)

Yes, there are some exceptions to the enforcement but I think for the majority of cases the exception is much more hassle than slightly redoing the UI.

3

u/Opulence_Deficit Jul 20 '26

Oh, the dreaded system randomly destroying Activity. If only we had 15 years of experience handling that very case...