When using the translucent status and navigation bars from the new Android 4.4 KitKat APIs, setting fitsSystemWindows=\"true\"
and clipToPadding=\"false\"
I encountered the same problem. When I replace Fragment. The 'fitsSystemWindows' doesn't work.
I fixed by code add to your fragment
@Override
public void onViewCreated(final View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
AndroidUtil.runOnUIThread(new Runnable() {
@Override
public void run() {
((ViewGroup) getView().getParent()).setFitsSystemWindows(true);
}
});
}