动态修改View的权重,只需重新设置layoutParams即可
view.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,0,3))
其中最后一个参数就是需要设置的新权重