I am working on a camera application, but when I change the orientation the activity is rebuilt, the problem is that it takes about 2 seconds to start all over again and that looks very bad because there is a pause in the image, that's why I want it have a similar behavior to the default camera application that when rotating the screen simply rotates the icons, no unpleasant pauses are seen ...
I tried setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
but
getResources().getConfiguration().orientation
it always returns 1 (portrait), so I want something similar to the behavior of SCREEN_ORIENTATION_PORTRAIT
which does nothing when rotating the screen.
But I need detect that the screen was rotated (so I can control what should happen)