开发者

Android: Lock Portrait mode for 5 seconds then allow screen orientation change

开发者 https://www.devze.com 2023-03-14 17:00 出处:网络
Is this possible? I currently have intent that is activated when the orientation changes but after some testing it is a problem if the phone is in landscape mode when going开发者_如何学Go the new clas

Is this possible? I currently have intent that is activated when the orientation changes but after some testing it is a problem if the phone is in landscape mode when going开发者_如何学Go the new class.


I don't see why not. You would need to do it programmatically though. My first thought is to create an activity with a runnable. In your onCreate, lock the orientation that you want and kick off the runnable thread. In the runnable thread, wait 5 seconds and then unlock the orientation.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号