小菜单的展开
This commit is contained in:
parent
9dcc23960e
commit
7fe7178b27
@ -13,6 +13,39 @@ public class CustomDrawerPopupEvent extends BaseModel {
|
|||||||
private String htmlUrl;
|
private String htmlUrl;
|
||||||
//是否半屏展示
|
//是否半屏展示
|
||||||
private boolean screen = false;
|
private boolean screen = false;
|
||||||
|
//系统消息
|
||||||
|
private boolean systemNotice = false;
|
||||||
|
//在线客服
|
||||||
|
private boolean online = false;
|
||||||
|
//举报
|
||||||
|
private boolean reportLayout = false;
|
||||||
|
|
||||||
|
public boolean isSystemNotice() {
|
||||||
|
return systemNotice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setSystemNotice(boolean systemNotice) {
|
||||||
|
this.systemNotice = systemNotice;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOnline() {
|
||||||
|
return online;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setOnline(boolean online) {
|
||||||
|
this.online = online;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isReportLayout() {
|
||||||
|
return reportLayout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setReportLayout(boolean reportLayout) {
|
||||||
|
this.reportLayout = reportLayout;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getHtmlUrl() {
|
public String getHtmlUrl() {
|
||||||
return htmlUrl;
|
return htmlUrl;
|
||||||
|
@ -127,6 +127,8 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
|||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.system_notice), new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.system_notice), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -185,16 +187,38 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
|||||||
void slideSetting();
|
void slideSetting();
|
||||||
|
|
||||||
void floatSetting();
|
void floatSetting();
|
||||||
|
|
||||||
|
void systemNotice();
|
||||||
|
|
||||||
|
void online();
|
||||||
|
|
||||||
|
void reportLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void OnCustomDrawerPopupEvent(CustomDrawerPopupEvent event) {
|
public void OnCustomDrawerPopupEvent(CustomDrawerPopupEvent event) {
|
||||||
if (callBack != null) {
|
if (callBack != null) {
|
||||||
|
if (!TextUtils.isEmpty(event.getRightsInterests())) {
|
||||||
callBack.informationTransfer(event);
|
callBack.informationTransfer(event);
|
||||||
|
}
|
||||||
|
if (event.getActivityId() != 0) {
|
||||||
callBack.funGamesID(event.getActivityId());
|
callBack.funGamesID(event.getActivityId());
|
||||||
|
}
|
||||||
if (!TextUtils.isEmpty(event.getHtmlUrl())) {
|
if (!TextUtils.isEmpty(event.getHtmlUrl())) {
|
||||||
callBack.showerHtml(event.getHtmlUrl(), event.isScreen());
|
callBack.showerHtml(event.getHtmlUrl(), event.isScreen());
|
||||||
}
|
}
|
||||||
|
if (event.isSystemNotice()) {
|
||||||
|
dismiss();
|
||||||
|
callBack.systemNotice();
|
||||||
|
}
|
||||||
|
if (event.isOnline()) {
|
||||||
|
dismiss();
|
||||||
|
callBack.online();
|
||||||
|
}
|
||||||
|
if (event.isReportLayout()) {
|
||||||
|
dismiss();
|
||||||
|
callBack.reportLayout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//是否关闭弹窗
|
//是否关闭弹窗
|
||||||
if (event.isDisMiss()) {
|
if (event.isDisMiss()) {
|
||||||
|
@ -6,6 +6,9 @@ import androidx.annotation.NonNull;
|
|||||||
|
|
||||||
import com.lxj.xpopup.core.AttachPopupView;
|
import com.lxj.xpopup.core.AttachPopupView;
|
||||||
import com.yunbao.common.R;
|
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 MoreMenuPopupView extends AttachPopupView {
|
public class MoreMenuPopupView extends AttachPopupView {
|
||||||
public MoreMenuPopupView(@NonNull Context context) {
|
public MoreMenuPopupView(@NonNull Context context) {
|
||||||
@ -19,6 +22,33 @@ public class MoreMenuPopupView extends AttachPopupView {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
|
//系统通知
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.system_notice), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
|
Bus.get().post(new CustomDrawerPopupEvent()
|
||||||
|
.setDisMiss(true).setSystemNotice(true));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//在线客服
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.online), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
|
Bus.get().post(new CustomDrawerPopupEvent()
|
||||||
|
.setDisMiss(true).setOnline(true));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//举报
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.report_layout), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
|
Bus.get().post(new CustomDrawerPopupEvent()
|
||||||
|
.setDisMiss(true).setReportLayout(true));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/system_notice"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
@ -34,6 +35,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/online"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="18dp"
|
android:layout_marginStart="18dp"
|
||||||
@ -55,6 +57,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/report_layout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="18dp"
|
android:layout_marginStart="18dp"
|
||||||
|
@ -787,6 +787,28 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
Bus.get().post(new LiveAudienceEvent()
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
.setType(LiveAudienceEvent.LiveAudienceType.FLOAT_SETTING));
|
.setType(LiveAudienceEvent.LiveAudienceType.FLOAT_SETTING));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void systemNotice() {
|
||||||
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setBean(mLiveBean)
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.NOTICE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void online() {
|
||||||
|
|
||||||
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setBean(mLiveBean)
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.ONLINE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reportLayout() {
|
||||||
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setBean(mLiveBean)
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.REPORT));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
new XPopup.Builder(mContext)
|
new XPopup.Builder(mContext)
|
||||||
.hasShadowBg(false)
|
.hasShadowBg(false)
|
||||||
|
Loading…
Reference in New Issue
Block a user