Java tutorial
//package com.java2s; import android.app.Activity; import android.view.ViewGroup; public class Main { public static void setRootView(Activity activity, boolean fitsSystemWindows) { ViewGroup rootView = (ViewGroup) ((ViewGroup) activity.findViewById(android.R.id.content)).getChildAt(0); rootView.setFitsSystemWindows(fitsSystemWindows); rootView.setClipToPadding(fitsSystemWindows); } }