{ //展开的状态 params.flags &= (~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE) ; params.y = 0; // params.x = 0; params.width = WindowManager.LayoutParams.MATCH_PARENT; if (UiUtils.checkDeviceHasNavigationBar(getApplicationContext())) { params.height = WindowManager.LayoutParams.MATCH_PARENT;//带导航栏的用这个 } else { params.height = height; //20229.17解决iPPhone 不能隐藏状态栏的问题 } Drawable drawable = getDrawable(R.drawable.min); btnMin.setBackground(drawable); }