my code is below but not call this method when screen orientation changed .
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig
Intent in=new Intent("com.world.delailsActivity")
startActivity(in)
}
and mainfest.xml file is
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".WorldCup" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"
android:configChanges="keyboardHidden|orientation" />
</intent-filter>
</activity>
<activity android:name=".Score开发者_JAVA百科Activity" android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation" >
<intent-filter>
<action android:name="com.worldcup.ScoreActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
In your first Activity, your android:configChanges attribute should be in your activity element, not category.
精彩评论