Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lock orientation for custom tabs

I would like to lock the orientation using Chrome Custom Tabs. Is this something I can do with the Low Level API or do I need to get a new method added for this functionality?

My use case is that I have an app that has custom tabs and I want it to always show the custom tab in portrait, never landscape.

like image 507
Kirk Elliott Avatar asked Jul 06 '16 18:07

Kirk Elliott


1 Answers

Custom Tabs does not currently provide an API that allows the developer to lock the orientation.

As a best practice, developers should always think twice before forcing a specific orientation, as it may be annoying to force the user to use one.

Locking the orientation looks more like something that should be decided by the content being opened inside the Custom Tabs (using an API like this) than something to be handled by the Custom Tab itself.

like image 188
andreban Avatar answered Oct 11 '22 13:10

andreban