Background
I have an app that has 2 activities :
- splash activity, which is shown in full screen (no action bar, no notification bar)
- main activity, which has both action bar (uses actionBarSherlock) and notification bar.
The problem
For some reason, when going from the first activity to the second, there is a "jumpy" layout process , which shows the content of the second activity without the action bar and notification bar, and a moment later it shows them both.
This causes the content below to move too, which is very noticeable.
Possible solution
As I've seen, a possible solution would be to hide the action bar and show it a bit later (500ms later), but this seems like a bad solution (making it slower and hiding for no reason) , plus i need to get the actionBar items positions for another purpose (for showing a tutorial).
The question
Is it possible to avoid the "jumpyness" ? One that doesn't involve such a weird workaround ?
I've solved my problem doing the following:
1.- I have to optimize all the screens where the AB was shown. In some cases I used ListViews which weren't correctly implemented and that caused a noticeable load time in the activity.
2.- I have shown the status bar BEFORE starting the new activity. I mean: I've shown the status bar in the fullscreen activity just before starting the non-fullscreen one. With that I achieved that the layout of the second activity (non-fullscreen) was never resized.
With this two little changes now the AB transition is much more smoother.
You can find the complete post with my answer at: Smoother transition from fullscreen activity using ActionBarSherlock
Why don't you use some other animation slide transitions rather than default popping one?
something like this?
overridePendingTransition(android.R.anim.accelerate_interpolator, android.R.anim.slide_out_right);
Here is the Animation lists that you can use http://developer.android.com/reference/android/R.anim.html
来源:https://stackoverflow.com/questions/20731429/smooth-transition-between-full-screen-activity-and-one-with-notification-bar-and