侧边栏修改,新增播放设置
This commit is contained in:
@@ -23,6 +23,28 @@ public class CustomDrawerPopupEvent extends BaseModel {
|
||||
private boolean refresh = false;
|
||||
//特效設置
|
||||
private boolean effects = false;
|
||||
//小窗播放
|
||||
private boolean smallWindow = false;
|
||||
//畫質選擇
|
||||
private boolean qualitySelection = false;
|
||||
|
||||
public boolean isSmallWindow() {
|
||||
return smallWindow;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setSmallWindow(boolean smallWindow) {
|
||||
this.smallWindow = smallWindow;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isQualitySelection() {
|
||||
return qualitySelection;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setQualitySelection(boolean qualitySelection) {
|
||||
this.qualitySelection = qualitySelection;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isRefresh() {
|
||||
return refresh;
|
||||
|
||||
@@ -146,6 +146,20 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
||||
.popupPosition(PopupPosition.Top)
|
||||
.asCustom(new MoreMenuPopupView(mContext))
|
||||
|
||||
.show();
|
||||
}
|
||||
});
|
||||
//播放设置
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_play_setting), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.more_menu));
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.popupPosition(PopupPosition.Top)
|
||||
.asCustom(new PlaySettingPopupView(mContext))
|
||||
|
||||
.show();
|
||||
}
|
||||
});
|
||||
@@ -235,10 +249,18 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
||||
dismiss();
|
||||
callBack.reportLayout();
|
||||
}
|
||||
if(event.isEffects()){
|
||||
if (event.isEffects()) {
|
||||
dismiss();
|
||||
callBack.effectsSetting();
|
||||
}
|
||||
if (event.isSmallWindow()) {
|
||||
dismiss();
|
||||
callBack.floatSetting();
|
||||
}
|
||||
if (event.isQualitySelection()) {
|
||||
dismiss();
|
||||
callBack.changeVideo();
|
||||
}
|
||||
|
||||
}
|
||||
if (event.isRefresh()) {
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.AttachPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class PlaySettingPopupView extends AttachPopupView {
|
||||
public PlaySettingPopupView(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_play_setting;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
//特效设置
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.effects_settings_layout), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
Bus.get().post(new CustomDrawerPopupEvent()
|
||||
.setDisMiss(true).setEffects(true));
|
||||
}
|
||||
});
|
||||
//小窗播放
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.float_settings_layout), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
Bus.get().post(new CustomDrawerPopupEvent()
|
||||
.setDisMiss(true).setSmallWindow(true));
|
||||
}
|
||||
});
|
||||
//畫質選擇
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.system_notice), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
Bus.get().post(new CustomDrawerPopupEvent()
|
||||
.setDisMiss(true).setQualitySelection(true));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user