I have been trying to solve a problem that is driving me nuts for ages. I have an app with one Activity that shows different screens by dynamic fragment exchange, ie the usual
getFragmentManager().beginTransaction().replace(R.id.fragementContainer, new SomeFragment()).commit();
This works great on my Nexus 4, Nexus 5, Nexus 7 2012, Nexus 7 2013, Moto G 1st gen etc. Mostly everything except Samsung devices (SGS5, SGS6). On these devices, sometimes (rarely, but not rarely enough) the replace() call seems to be misinterpreted as an add() call and the new fragment appears on top of the previous one.
I have tried replicating the bug but there doesn't seem to be any pattern to it. Since I get no error messages anywhere, I can't really troubleshoot it.