Problem with android when changing orientation in devices

I am starting winth cocos2dx :slight_smile: i am having the problem in Android when changing orientation in runtime, when it is specified in the manifest (landscape or portrait) it has no problem.

The problem is that it doesn’t rearrange the sprites in screen, is like the screen doesn’t change size only orientation.

this is my c++ code where I add the sprite.

CCSprite* pSprite = CCSprite::create(“settings.png”);
CC_BREAK_IF(!pSprite);
pSprite~~>setPosition);
CCLabelTTF* pLabel = CCLabelTTF::create;
CC_BREAK_IF;
pLabel~~>setAnchorPoint(ccp(0,0.5));
pLabel~~>setPosition.width + 10, pSprite~~>getContentSize().height/2));

pSprite~~>addChild;
this~~>addChild(pSprite, 0);

and this is my manifest

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.demo.cocos" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="8"/> <application android:label="string/app_name"
android:debuggable=“true”
android:icon=“`drawable/icon">

<activity android:name=".Demo"
android:label=“string/app\_name” android:screenOrientation=“unspecified” android:theme="android:style/Theme.NoTitleBar.Fullscreen”>







`

I am uploading the two images of the orientation, it starts in landscape and I rotate it to portrait


orientation.png (72.3 KB)