Detect orientation change, when only portrait is allowed on Android

Posted by bicska88 on Stack Overflow See other posts from Stack Overflow or by bicska88
Published on 2012-08-29T11:34:57Z Indexed on 2012/09/09 9:38 UTC
Read the original article Hit count: 255

I have to solve the following: I have an Activity which's android:screenOrientation="portrait". Even though, when the device is rotated to landscape while this Activity is visible, I have to start another one, and, when the device is rotated back to portrait, I have to finish() the activity in landscape. I tried to perform this with a BroadcastReceiver, but this special activity doesn't receive any broadcasts because of the android:screenOrientation="portrait". Any help is well appreciated.

Thanks.

© Stack Overflow or respective owner

Related posts about android

Related posts about android-orientation