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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -