ZhouWeikuan / cocos2d

cocos2d for android, based on cocos2d-android-0.82, and now ported from cocos2d-iphone 0.99.4. The googlecode address is here: http://code.google.com/p/cocos2d-android-1/ . There are several demos to watch.
610 stars 291 forks source link

Issue when using using landscape mode #60

Closed BMR11 closed 12 years ago

BMR11 commented 12 years ago

Hi, When we use CCDirector.sharedDirector().setDeviceOrientation(CCDirector.kCCDeviceOrientationLandscapeLeft) its having issue when we press lock button. When we press lock button it calls onPause->onStop->onDestroy.. So we are thrown out of out applicaton. When we are back from locked screen it shows home screen of phone , because onDestroy called. But when we use CCDirector.kCCDeviceOrientationPortrait its working fine, I mean it wont call onDestroy and we are resumed to same screen when we are back from lock screen.

Please anybody have faced the issue? Thanks -BMR

opengenius commented 12 years ago

Try adding for your activity instead of setDeviceOrientation. android:configChanges="orientation|keyboardHidden" android:screenOrientation="landscape"

BMR11 commented 12 years ago

Thanks , It worked for me. -BMR.