I have a graphical problem with my nexus 5. While I changing fragment, before new fragment appears, there is this big square with a portion of the new fragment. The transition isn't smooth.
I use getSupportFragmentManager() for fragment. With the emulator(API 21) and other devices(API < 21) is all ok, with my device(API 21) i have this problem. Some ideas?
EDIT: This error occurs only when (and every time) a fragment is replace, not when it is added.
SOLVED!!!
I've found the solution. I've set the background color of root activity(also if it is never shown like in my case) and the graphical glitch is gone.
This seems to be a bug in the android graphics lib on all nexus devices. I have a similar issue using the FragmentManger, see
To fix this issue on nexus devices, add the
<application android:hardwareAccelerated="false">
tag, but this will make the app very slow.
EDIT:
There are several Threads in the Google issue tracker or at stackoverflow describing this problem
Issue 82631
Stackoverflow