I have a ViewPager in my layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.v4.view.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:layout_height="match_parent" />
</RelativeLayout>
And I want all Fragments to be in fullscreen mode (the screen should be also under status bar). I also set in that Activity:
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
);
and tried several thinks but nothing work. In a different Activity this code works OK.
Do you know where the problem is?