java - How to handle screen orientation change -
i'm trying handle screen orientation change android application without success. here's manifest :
<activity android:name="fr.ups.l3info.l3info_catchgameactivity.catchgameactivity" android:label="@string/app_name" android:screenorientation="user" android:configchanges="orientation|keyboardhidden" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity>
and adde function in activity class :
public void onconfigurationchanged(configuration newconfig) { super.onconfigurationchanged(newconfig); }
but when change screen orientation application recreated , function never executed. have done wrong? help.
use in manifest android:configchanges="keyboardhidden|orientation|screensize|layoutdirection"
Comments
Post a Comment