实例如下:

WindowManager wm = (WindowManager) getContext()
.getSystemService(Context.WINDOW_SERVICE);
int width = wm.getDefaultDisplay().getWidth();
int height = (int) (width - 22*density) / 3;
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mLinearLayoutTrafficControl.getLayoutParams();
lp.height = height;
LinearLayout.LayoutParams lp2 = (LinearLayout.LayoutParams) mLinearLayoutTrafficControl2.getLayoutParams();
lp2.height = height;
LinearLayout.LayoutParams lp3 = (LinearLayout.LayoutParams) mLinearLayoutTrafficServicesBusinessOnline.getLayoutParams();
lp3.height = height; 
售后响应及时
7×24小时客服热线
数据备份
更安全、更高效、更稳定
价格公道精准
项目经理精准报价不弄虚作假
合作无风险
重合同讲信誉,无效全额退款