|
|
|
|
@ -213,10 +213,10 @@ public class LiveActivity extends BaseActivity implements GroupPresenter.OnClick |
|
|
|
|
mBinding.control.invert.setActivated(Setting.isInvert()); |
|
|
|
|
mBinding.control.across.setActivated(Setting.isAcross()); |
|
|
|
|
mBinding.control.change.setActivated(Setting.isChange()); |
|
|
|
|
mBinding.control.home.setVisibility(LiveConfig.isOnly() ? View.GONE : View.VISIBLE); |
|
|
|
|
findViewById(R.id.timeBar).setNextFocusUpId(R.id.player); |
|
|
|
|
getExo().getSubtitleView().setStyle(ExoUtil.getCaptionStyle()); |
|
|
|
|
getIjk().getSubtitleView().setStyle(ExoUtil.getCaptionStyle()); |
|
|
|
|
mBinding.control.home.setVisibility(LiveConfig.isOnly() ? View.GONE : View.VISIBLE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setScale(int scale) { |
|
|
|
|
@ -236,6 +236,7 @@ public class LiveActivity extends BaseActivity implements GroupPresenter.OnClick |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void getLive() { |
|
|
|
|
mBinding.control.home.setText(getHome().getName()); |
|
|
|
|
mPlayers.setPlayer(getPlayerType(-1)); |
|
|
|
|
mViewModel.getLive(getHome()); |
|
|
|
|
setPlayerView(); |
|
|
|
|
@ -249,12 +250,13 @@ public class LiveActivity extends BaseActivity implements GroupPresenter.OnClick |
|
|
|
|
for (Group group : live.getGroups()) (group.isHidden() ? mHides : items).add(group); |
|
|
|
|
mGroupAdapter.setItems(items, null); |
|
|
|
|
setPosition(LiveConfig.get().find(items)); |
|
|
|
|
mBinding.control.home.setText(live.getName()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
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) { |
|
|
|
|
@ -740,12 +742,14 @@ public class LiveActivity extends BaseActivity implements GroupPresenter.OnClick |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void prevLine() { |
|
|
|
|
if (mChannel == null) return; |
|
|
|
|
mChannel.prevLine(); |
|
|
|
|
showInfo(); |
|
|
|
|
fetch(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void nextLine(boolean show) { |
|
|
|
|
if (mChannel == null) return; |
|
|
|
|
mChannel.nextLine(); |
|
|
|
|
if (show) showInfo(); |
|
|
|
|
else setInfo(); |
|
|
|
|
|