动态添加LinearLayout的高度实例-创新互联
实例如下:
在德城等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都做网站、成都网站制作 网站设计制作按需开发网站,公司网站建设,企业网站建设,品牌网站设计,全网整合营销推广,成都外贸网站建设公司,德城网站建设费用合理。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;
当前标题:动态添加LinearLayout的高度实例-创新互联
链接分享:http://myzitong.com/article/jdggd.html