|
|
|
|
@ -253,8 +253,10 @@ public class LiveActivity extends BaseActivity implements GroupPresenter.OnClick |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setWidth(Live live) { |
|
|
|
|
int base = ResUtil.dp2px(live.hasLogo() ? 98 : 50); |
|
|
|
|
for (Group group : live.getGroups()) live.setWidth(Math.max(live.getWidth(), ResUtil.getTextWidth(group.getName(), 16))); |
|
|
|
|
mBinding.group.getLayoutParams().width = Math.min(live.getWidth() + ResUtil.dp2px(live.hasLogo() ? 98 : 50), ResUtil.dp2px(260)); |
|
|
|
|
mBinding.group.getLayoutParams().width = live.getWidth() == 0 ? 0 : Math.min(live.getWidth() + base, ResUtil.dp2px(200)); |
|
|
|
|
mBinding.divide.setVisibility(live.getWidth() == 0 ? View.GONE : View.VISIBLE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setPosition(int[] position) { |
|
|
|
|
|