I use the Navigation Drawer, and in a Fragment that is open I want to have the active screen.
I use:
getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
But this thing light up the screen in every fragment of the navigation drawer. How can I get the screen active only in one fragment?