动态控制LinearLayout的布局
2021-05-18 本文已影响0人
sunqiyue
由于item布局的显示不太理想,动态控制一下LinearLayout布局
LinearLayout ll_choose = helper.getView(R.id.ll_choose);
LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) ll_choose.getLayoutParams();
//setMargins( left, top, righ, bottom)
params.setMargins(16, 0, 0, 0);
ll_choose.setLayoutParams(params);