Lock orientation for custom tabs

这一生的挚爱 提交于 2019-12-04 01:20:44

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/38231103/lock-orientation-for-custom-tabs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!