|
|
|
|
@ -425,12 +425,13 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List |
|
|
|
|
float[] range = {2.4f, 1.8f, 1.2f, 0.8f}; |
|
|
|
|
float speed = range[Setting.getDanmuSpeed()]; |
|
|
|
|
float alpha = Setting.getDanmuAlpha() / 100.0f; |
|
|
|
|
float sizeScale = Setting.getDanmuSize(); |
|
|
|
|
HashMap<Integer, Integer> maxLines = new HashMap<>(); |
|
|
|
|
maxLines.put(BaseDanmaku.TYPE_FIX_TOP, maxLine); |
|
|
|
|
maxLines.put(BaseDanmaku.TYPE_SCROLL_RL, maxLine); |
|
|
|
|
maxLines.put(BaseDanmaku.TYPE_SCROLL_LR, maxLine); |
|
|
|
|
maxLines.put(BaseDanmaku.TYPE_FIX_BOTTOM, maxLine); |
|
|
|
|
mDanmakuContext.setDanmakuStyle(IDisplayer.DANMAKU_STYLE_STROKEN, 3).setMaximumLines(maxLines).setScrollSpeedFactor(speed).setDanmakuTransparency(alpha).setDanmakuMargin(12).setScaleTextSize(0.8f); |
|
|
|
|
mDanmakuContext.setDanmakuStyle(IDisplayer.DANMAKU_STYLE_STROKEN, 3).setMaximumLines(maxLines).setScrollSpeedFactor(speed).setDanmakuTransparency(alpha).setDanmakuMargin(12).setScaleTextSize(sizeScale); |
|
|
|
|
mBinding.control.danmu.setActivated(Setting.isDanmu()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -782,7 +783,7 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List |
|
|
|
|
mBinding.video.setForeground(null); |
|
|
|
|
mBinding.video.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT)); |
|
|
|
|
mBinding.flag.setSelectedPosition(getCurrentFlag()); |
|
|
|
|
mDanmakuContext.setScaleTextSize(1.2f); |
|
|
|
|
mDanmakuContext.setScaleTextSize(1.2f * Setting.getDanmuSize()); |
|
|
|
|
setSubtitle(Setting.getSubtitle()); |
|
|
|
|
mKeyDown.setFull(true); |
|
|
|
|
setFullscreen(true); |
|
|
|
|
@ -793,7 +794,7 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List |
|
|
|
|
private void exitFullscreen() { |
|
|
|
|
mBinding.video.setForeground(ResUtil.getDrawable(R.drawable.selector_video)); |
|
|
|
|
mBinding.video.setLayoutParams(mFrameParams); |
|
|
|
|
mDanmakuContext.setScaleTextSize(0.8f); |
|
|
|
|
mDanmakuContext.setScaleTextSize(0.8f * Setting.getDanmuSize()); |
|
|
|
|
getFocus1().requestFocus(); |
|
|
|
|
mKeyDown.setFull(false); |
|
|
|
|
setFullscreen(false); |
|
|
|
|
|