1.排麦入口优化
2.红包入口放入房间更多
This commit is contained in:
@@ -20,8 +20,6 @@ import android.view.WindowManager;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedPackageModel;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.module_hall.HallDataManager;
|
||||
import com.yizhuan.erban.ui.widget.marqueeview.Utils;
|
||||
@@ -85,10 +83,11 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
Utils.dip2px(getContext(), 10),
|
||||
Utils.dip2px(getContext(), 20),
|
||||
true));
|
||||
rvOPtList.setLayoutManager(new FullyGridLayoutManager(getContext(), 4));
|
||||
rvOPtList.setLayoutManager(new FullyGridLayoutManager(getContext(), 5));
|
||||
optAdapter = new OptAdapter(context, null);
|
||||
addPKAction(optAdapter);
|
||||
addDatingAction(optAdapter);
|
||||
addRedPacketAction(optAdapter);
|
||||
addKTVAction(optAdapter);
|
||||
//addGameAction(optAdapter);
|
||||
addRoomLimit(optAdapter);
|
||||
@@ -143,10 +142,10 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
R.drawable.ic_room_opt_op_pk :
|
||||
R.drawable.ic_room_opt_in_pk;
|
||||
optAdapter.addData(new OptAction(icon, str, () -> {
|
||||
if (onActionListener != null) {
|
||||
onActionListener.onPKAction();
|
||||
}
|
||||
}));
|
||||
if (onActionListener != null) {
|
||||
onActionListener.onPKAction();
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -181,6 +180,26 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 相亲 模式
|
||||
*
|
||||
* @param optAdapter
|
||||
*/
|
||||
private void addRedPacketAction(OptAdapter optAdapter) {
|
||||
if (AvRoomDataManager.get().isRedEnvelopeOpen()) {
|
||||
RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo == null) {
|
||||
return;
|
||||
}
|
||||
optAdapter.addData(new OptAction(R.drawable.ic_room_opt_red_package, "红包", () -> {
|
||||
if (onActionListener != null) {
|
||||
onActionListener.onRedPackageAction();
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加KTV 操作
|
||||
*
|
||||
@@ -480,6 +499,8 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
|
||||
void onDatingAction();
|
||||
|
||||
void onRedPackageAction();
|
||||
|
||||
void onGameAction();
|
||||
|
||||
void onRoomHall();
|
||||
|
@@ -286,6 +286,8 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
@Nullable
|
||||
private UserInfoDialog userInfoDialog;
|
||||
|
||||
@Nullable
|
||||
private RedPackageSendDialog redPackageSendDialog;
|
||||
|
||||
public static HomePartyRoomFragment newInstance(boolean isRoomMin) {
|
||||
HomePartyRoomFragment roomFragment = new HomePartyRoomFragment();
|
||||
@@ -1072,7 +1074,13 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
} else {
|
||||
closeDatingMode();
|
||||
}
|
||||
|
||||
if ((AvRoomDataManager.get().isDatingMode() || AvRoomDataManager.get().isOpenPKMode()) && !AvRoomDataManager.get().isManager()) {
|
||||
gameBinding.ivQueuingMicro.setVisibility(View.VISIBLE);
|
||||
gameBinding.ivQueuingMicro.setImageResource(AvRoomDataManager.get().isDatingMode() ?
|
||||
R.drawable.ic_dating_queuing_micro : R.drawable.ic_pk_queuing_micro);
|
||||
} else {
|
||||
gameBinding.ivQueuingMicro.setVisibility(View.GONE);
|
||||
}
|
||||
if (microView.getAdapter() != null) {
|
||||
String microType = microView.getAdapter().microType();
|
||||
|
||||
@@ -1475,6 +1483,9 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
case R.id.iv_treasure_box_cp:
|
||||
onClickBox();
|
||||
break;
|
||||
case R.id.iv_queuing_micro:
|
||||
gameBinding.bottomView.onClick(v);
|
||||
break;
|
||||
case R.id.iv_dragon_start_button:
|
||||
if (AvRoomDataManager.get().haveStartDragon) {
|
||||
return;
|
||||
@@ -1847,6 +1858,9 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
if (giftDialog != null) giftDialog.dismiss();
|
||||
if (dynamicFaceDialog != null) dynamicFaceDialog.dismiss();
|
||||
if (userInfoDialog != null) userInfoDialog.dismiss();
|
||||
if (redPackageSendDialog != null) {
|
||||
redPackageSendDialog.dismissAllowingStateLoss();
|
||||
}
|
||||
}
|
||||
|
||||
private void showRoomIntroduction(boolean isModify) {
|
||||
@@ -2255,6 +2269,14 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
() -> getMvpPresenter().datingOpen());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRedPackageAction() {
|
||||
redPackageSendDialog = new RedPackageSendDialog();
|
||||
redPackageSendDialog.show(getActivity());
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_SENDHONGBAO_CLICK,
|
||||
"进入发红包页面");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRoomHall() {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_MY_HALL_CLICK, "厅管理入口");
|
||||
|
@@ -15,6 +15,7 @@ import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.manager.IMMessageManager;
|
||||
import com.yizhuan.xchat_android_core.market_verify.MarketVerifyModel;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomModeType;
|
||||
import com.yizhuan.xchat_android_core.room.pk.model.PkModel;
|
||||
import com.yizhuan.xchat_android_core.super_admin.util.SuperAdminUtil;
|
||||
import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
|
||||
@@ -208,14 +209,22 @@ public class BottomView extends RelativeLayout implements View.OnClickListener {
|
||||
micLayout.setVisibility(GONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* PK模式、相亲模式的管理员,排麦模式的所有人,展示排麦按钮
|
||||
* PK模式、相亲模式的普通用户入口展示在BottomView右上方
|
||||
*/
|
||||
|
||||
public void updateQueuingMicButton() {
|
||||
if (SuperAdminUtil.isSuperAdmin()) {
|
||||
iconMicQueue.setVisibility(GONE);
|
||||
return;
|
||||
}
|
||||
//排麦模式或PK模式展示排麦麦按钮
|
||||
iconMicQueue.setVisibility((AvRoomDataManager.get().isQueuingMicro() || AvRoomDataManager.get().isOpenPKMode()) &&
|
||||
!AvRoomDataManager.get().isCpRoom()? VISIBLE : GONE);
|
||||
RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo == null) return;
|
||||
boolean show = (AvRoomDataManager.get().isQueuingMicro() || AvRoomDataManager.get().isOpenPKMode()) &&
|
||||
!AvRoomDataManager.get().isCpRoom() &&
|
||||
(AvRoomDataManager.get().isManager() || roomInfo.getRoomModeType() == RoomModeType.OPEN_MICRO_MODE);
|
||||
iconMicQueue.setVisibility(show ? VISIBLE : GONE);
|
||||
}
|
||||
|
||||
public void setQueuingMicButtonBackground(boolean isEmpty) {
|
||||
@@ -299,6 +308,7 @@ public class BottomView extends RelativeLayout implements View.OnClickListener {
|
||||
// }
|
||||
// break;
|
||||
case R.id.icon_mic_queue:
|
||||
case R.id.iv_queuing_micro://注意这里是在HomePartyRoomFragment调用的
|
||||
if (wrapper != null) {
|
||||
wrapper.onMicQueueClick();
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable-xhdpi/ic_dating_queuing_micro.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_dating_queuing_micro.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_pk_queuing_micro.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_pk_queuing_micro.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_room_opt_red_package.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_room_opt_red_package.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
@@ -8,8 +8,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:scaleType="centerInside"
|
||||
tools:src="@drawable/icon_room_admin" />
|
||||
|
||||
|
@@ -291,15 +291,30 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_treasure_box"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_above="@id/iv_queuing_micro"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/icon_room_treasure_box"
|
||||
tools:contentDescription="许愿池" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_queuing_micro"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/fl_speedy_message"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/icon_room_treasure_box"
|
||||
tools:contentDescription="许愿池" />
|
||||
android:src="@drawable/ic_dating_queuing_micro"
|
||||
android:visibility="gone"
|
||||
tools:contentDescription="我要参加" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_activity_img_left"
|
||||
|
Reference in New Issue
Block a user