update 清晰度切换
This commit is contained in:
@@ -127,8 +127,10 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.system_notice), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
// dismiss();
|
||||
|
||||
dismiss();
|
||||
if (callBack != null) {
|
||||
callBack.systemNotice();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,16 +12,28 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class LiveClarityCustomPopup extends BottomPopupView implements View.OnClickListener {
|
||||
public static final int BAN_720 = 1;
|
||||
public static final int BAN_1080 = 2;
|
||||
private int selectClarity = 1;
|
||||
private RelativeLayout lineSd, lineHd, lineFhd;
|
||||
private ImageView iconSd, iconHd, iconFhd;
|
||||
private int banSelect;
|
||||
|
||||
public int getSelectClarity() {
|
||||
return selectClarity;
|
||||
}
|
||||
|
||||
public LiveClarityCustomPopup(@NonNull Context context, int selectClarity, int banSelect) {
|
||||
super(context);
|
||||
this.selectClarity = selectClarity;
|
||||
this.banSelect = banSelect;
|
||||
}
|
||||
|
||||
public LiveClarityCustomPopup(@NonNull Context context, int selectClarity) {
|
||||
super(context);
|
||||
if (selectClarity == -1) {
|
||||
selectClarity = 0;
|
||||
}
|
||||
this.selectClarity = selectClarity;
|
||||
}
|
||||
|
||||
@@ -75,6 +87,12 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
||||
selectClarity(selectClarity);
|
||||
dismiss();
|
||||
});
|
||||
if (banSelect == BAN_720) {
|
||||
lineFhd.setEnabled(false);
|
||||
lineHd.setEnabled(false);
|
||||
} else if (banSelect == BAN_1080) {
|
||||
lineFhd.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user