將高度拉伸了 ...
將高度拉伸了
protected void setStatusBar() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { final ViewGroup linear_bar = (ViewGroup) findViewById(R.id.bar_layout); final int statusHeight = getStatusBarHeight(); linear_bar.post(new Runnable() { @Override public void run() { int titleHeight = linear_bar.getHeight(); android.widget.LinearLayout.LayoutParams params = (android.widget.LinearLayout.LayoutParams) linear_bar.getLayoutParams(); params.height = statusHeight + titleHeight; linear_bar.setLayoutParams(params); } }); } }