I noticed a pretty irritating flicker that happens in the following scenario: display a fullscreen activity and then launch another activity that is not fullscreen.
In my app I use an action bar at the top of the second activity and I clearly see how a flickering is done when switching between the activities.
When the status bar appears, it doesn't smoothly push my activity down, but very quickly and with this annoying flicker.
Is there some API I can use to control this behaviour? Or some other workaround?
I had same issue. Below workaround fixed it, put this code before finishing your first activity.
Handler handler = new Handler();
handler.post(new Runnable() {
@Override
public void run() {
YourActivity.this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With