public interface IWindowInsetLayout {
boolean applySystemWindowInsets19(Rect insets);
boolean applySystemWindowInsets21(WindowInsetsCompat insets);
}
1、在API 21以前,自定义Layout等布局重写View.fitSystemWindows调用接口api的实现
2、ViewCompat.setOnApplyWindowInsetsListener(view, insetsListener),在listener回掉里面做applySystemWindowInsets设置