When I rotate my screen to 90 degrees, the screen rotates but it takes 3 seconds to start rotating. (This doesn't mean it rotates for 3 seconds. This means it waits 3 secs to starting rotation.) Can this be set in any property or any code related to do this setting?

I understand that this might be related to the sensor sensitivity, please let me know how to configure this if you know how.

migrated from stackoverflow.com Aug 16 '13 at 12:13

This question came from our site for professional and enthusiast programmers.

  • Is this observed in all applications or some specific one? – kriomant Aug 16 '13 at 6:39
  • this is in all applications. I tried this in the home screen. So this is why I assume there should be some configurations can be set. Even in the source code is fine. I just need to know where the possible configurations are. Re-building the source for me is fine. – SamLin Aug 16 '13 at 6:49
  • I don't understand what sources you are talking about. If these are sources of some application, then how your application may affect home screen rotation speed? Or do you mean Android sources? – kriomant Aug 16 '13 at 6:52
  • 1
    Here is an interesting finding. I wrote an app which is able to rotate the screen by pressing the button. In my tablet, it waits 3 seconds to rotate. In another high-end device which was set to 2second-dalay to rotate. Both of devices work the same way. Hence, I assume there must be a configuration to be set to change the "waiting" time. – SamLin Aug 16 '13 at 8:56
  • 2
    I imagine that that must be by design. What if you accidentally tilted your tablet to the side but then put it back quickly? Would you really want it to flip for every little movement? That said, I'm not aware of any way to change the "auto-rotation" sensitivity in stock Android. – ale Aug 16 '13 at 12:49

It means your activity is taking very long to be recreated since every time you rotate the screen, entire activity gets redrawn. It doesn't mean the phone sensor is slow or anything, you just need to optimize your code such that it doesn't load data (whether from internet or local storage) on orientation change but only recreates the layout. Hope I made myself clear.

  • Thanks. But from what I remembered, there seem to be some configurations can be set. I am not saying I am right, just want to make this issue clear. Well, does this make any sense for me to create an app to rotate the screen manually? – SamLin Aug 16 '13 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy