动态修改view 高度
int height = (int) context.getResources().getDimension(R.dimen.DIMEN_100dp);
public static void setHeight(View view, int nHeight) {
ViewGroup.LayoutParams lp = view.getLayoutParams();
if (lp.height != nHeight ) {
lp.height = nHeight;
view.setLayoutParams(lp);
}
}
https://blog.csdn.net/meixi_android/article/details/78019444
网友评论