int newHeight = 200; //注意这里,到底是用ViewGroup还是用LinearLayout或者是FrameLayout,主要是看你这个EditTex //控件所在的父控件是啥布局,如果是LinearLayout,那么这里就要改成LinearLayout.LayoutParams ViewGroup.LayoutParams lp = editText.getLayoutParams(); lp.height = newHeight; lp.addRule(RelativeLayout.ALIGN_LEFT, R.id.capture_crop_layout); editText.setLayoutParams(lp);
动态设置View的高度
猜你喜欢
转载自luke-feng.iteye.com/blog/2201662
今日推荐
周排行