Disable default animation from Portrait to Landscape

后端 未结 8 1172
庸人自扰
庸人自扰 2020-11-27 03:30

I have an app with several \'normal\' activities which can run on either landscape or portrait. They are designed for and mostly used on portrait.

This app has one s

8条回答
  •  日久生厌
    2020-11-27 04:08

    Against them who said no I say yes it is possible and it is very simple! The first thing may sound stupid but lock your application to the desired orientation! Then keep asking the gyrometer what orientation the device has an last but not least rotate or animate your views to the new orientation!

    Edit: you may want to hide the system ui since it won't rotate. Mario

提交回复
热议问题