I have Activity A which is set to run in portrait orientation (android:screenOrientation="portrait" set on this activity in the manifest). This activity opens to Activity B on a button click. Activity B is set to run in landscape orientation (android:screenOrientation="landscape" set on this activity in the manifest). Regardless of what I set in my overridePendingTransition method, there is never an animation. It's always a hard cut. Is there a way to force some sort of animation when transitioning from Act开发者_StackOverflow社区ivity A to Activity B?
Also, I get the same issue when transitioning back from Activity B to Activity A.
Edit (from Praveen):
Even i have decalred the configChanges="orientation"
in the Manifest. Still i am facing this Problem?? Any Idea on this???
Thanks in advance
i think you have to override activity's onConfigurationChange method. perhaps this will help you.
for example
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig);
updateGui();
}
You can use this after you run startActivity() :
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
精彩评论