标签:android png int ges statusbar class highlight tle eth
将高度拉伸了
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); } }); } }
标签:android png int ges statusbar class highlight tle eth
原文地址:http://www.cnblogs.com/ganchuanpu/p/6880555.html