Control default auto rotate screen in my application

后端 未结 4 527
我在风中等你
我在风中等你 2020-12-09 07:14

I have a toggle button in my application. I want to change or control default setting, Auto rotate screen(Settings>Display>Auto rotate screen) programmatically. Does anybody

4条回答
  •  臣服心动
    2020-12-09 07:34

    You set default rotation settings in your manifest file e.g:

    
    
    

    To change orientation programatically you have to call Activity.setRequestedOrientation()

提交回复
热议问题