PDA

View Full Version : Change orientation restart application



couetbis
4 Jul 2011, 12:10 AM
Hi,
When I change phone orientation, application restart consistently.
I use Sencha Touch 1.1.0 and PhoneGap 0.9.5.1.
Ideas ?

Hanni Sullivan
4 Jul 2011, 4:38 AM
On what hardware plattforms? I'm asking, because this is the default behaviour of Android.
See here (http://developer.android.com/guide/topics/resources/runtime-changes.html). It also describes how to overwrite this behaviour.

couetbis
4 Jul 2011, 6:46 AM
Yes, it's on Android.
I haven't this behaviour with an application on Sencha 1.0 et phonegap 0.9.4.

Hanni Sullivan
4 Jul 2011, 6:52 AM
With the same or an older Android version?

couetbis
4 Jul 2011, 7:09 AM
Yes with same Android version 2.3.3.
Views chain is lightly different, but I don't think that this.

steve1964
4 Jul 2011, 9:36 AM
Hi, chech your AndroidManifest,xml:


<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".app"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.phonegap.DroidGap" android:label="@string/app_name">
<intent-filter>
</intent-filter>
</activity>
</application>

Check your xml syntax and be sure that the config in red is present... Pay attention at the syntax because you dont receive any warning when you compile, i was facing the same problem...

couetbis
4 Jul 2011, 11:14 PM
Great, it's that !
Thanks very much.