If you do not want the status bar text to be dark, the following applies.
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
And change the color of the navigation bar as @ JaviChaqués suggests.