红包UI调整
@@ -92,6 +92,7 @@ import com.yizhuan.erban.ui.im.chat.MsgViewHolderGift;
|
||||
import com.yizhuan.erban.ui.im.chat.MsgViewHolderLevel;
|
||||
import com.yizhuan.erban.ui.im.chat.MsgViewHolderLottery;
|
||||
import com.yizhuan.erban.ui.im.chat.MsgViewHolderOnline;
|
||||
import com.yizhuan.erban.ui.im.chat.MsgViewHolderRedPackage;
|
||||
import com.yizhuan.erban.ui.im.chat.MsgViewHolderRedPacket;
|
||||
import com.yizhuan.erban.ui.im.chat.MsgViewHolderText;
|
||||
import com.yizhuan.erban.ui.im.chat.SignInNoticeMsgViewHolder;
|
||||
@@ -141,6 +142,7 @@ import com.yizhuan.xchat_android_core.im.custom.bean.NobleAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NoticeAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.OpenRoomNotiAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.OpenSignInAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RedPackageAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RedPacketAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.SysMsgAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.SysMsgV2Attachment;
|
||||
@@ -395,6 +397,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
NimUIKit.registerMsgItemViewHolder(SysMsgV2Attachment.class, SysMsgV2ViewHolder.class);
|
||||
NimUIKit.registerMsgItemViewHolder(LevelUpAttachment.class, MsgViewHolderLevel.class);
|
||||
NimUIKit.registerMsgItemViewHolder(AitMeAttachment.class, MsgViewHolderAitMe.class);
|
||||
NimUIKit.registerMsgItemViewHolder(RedPackageAttachment.class, MsgViewHolderRedPackage.class);
|
||||
// 声音瓶子
|
||||
// NimUIKit.registerMsgItemViewHolder(SysMsgVoiceAttachment.class, SysMsgVoiceViewHolder.class);
|
||||
// NimUIKit.registerMsgItemViewHolder(VoiceBottleSayHiAttachment.class, MsgViewHolderVoiceBottleSayHi.class);
|
||||
|
@@ -28,7 +28,6 @@ class RedPackageOpenAdapter : BaseQuickAdapter<RedEnvelopeItemVO, BaseViewHolder
|
||||
item.redEnvelopeGiftItemVOs?.let {
|
||||
if (it.isNotEmpty()) {
|
||||
helper.setGone(R.id.tv_diamond_num, false)
|
||||
.setGone(R.id.tv_diamond, false)
|
||||
val rvGift = helper.getView<RecyclerView>(R.id.rv_gift)
|
||||
val adapter = RedPackageGiftAdapter()
|
||||
rvGift.visibility = View.VISIBLE
|
||||
|
@@ -132,7 +132,6 @@ class RedPackageOpenDialog : BaseDialog<DialogRedPackageOpenBinding>() {
|
||||
val adapter = RedPackageGiftAdapter(R.layout.item_red_package_gift_top)
|
||||
binding.rvGift.visibility = View.VISIBLE
|
||||
binding.tvDiamondNum.visibility = View.GONE
|
||||
binding.tvDiamond.visibility = View.GONE
|
||||
binding.rvGift.layoutManager = LinearLayoutManager(context, RecyclerView.HORIZONTAL, false)
|
||||
binding.rvGift.adapter = adapter
|
||||
adapter.setNewData(this)
|
||||
@@ -150,7 +149,6 @@ class RedPackageOpenDialog : BaseDialog<DialogRedPackageOpenBinding>() {
|
||||
TIME_OUT, REMAIN_ZERO, TIME_OUT_BACK -> {
|
||||
binding.clOpened.setBackgroundResource(R.drawable.room_red_package_no_get_bg)
|
||||
binding.tvDiamondNum.visibility = View.GONE
|
||||
binding.tvDiamond.visibility = View.GONE
|
||||
binding.tvTips.visibility = View.GONE
|
||||
binding.tvNoGet.visibility = View.VISIBLE
|
||||
}
|
||||
|
@@ -2060,12 +2060,9 @@ public class MessageView extends FrameLayout {
|
||||
new OriginalDrawStatusClickSpan() {
|
||||
@Override
|
||||
public void onClick(@NonNull View view) {
|
||||
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_WELCOME_HIM, "欢迎TA");
|
||||
|
||||
ExtensionUtil.setWelcomeLocal(chatRoomMessage, true);
|
||||
mMessageAdapter.notifyItemChanged(position);
|
||||
|
||||
long targetUid = JavaUtil.str2long(chatRoomMessage.getFromAccount());
|
||||
Single.zip(AvRoomModel.get().getWelcomeConfig(targetUid),
|
||||
UserModel.get().getUserInfo(targetUid), (roomWelcomeConfig, info) -> {
|
||||
@@ -2089,7 +2086,6 @@ public class MessageView extends FrameLayout {
|
||||
LogUtil.e("send welcome msg failed, error: " + throwable.getMessage());
|
||||
})
|
||||
.subscribe();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ public class GiveGoldPassWordFragment extends DialogFragment {
|
||||
} else {
|
||||
mPassword.getTvRate().setVisibility(View.GONE);
|
||||
}
|
||||
mPassword.getTvGold().setText(getArguments().getString(EXTRA_GOLD) + "钻石");
|
||||
mPassword.getTvGold().setText(getArguments().getString(EXTRA_GOLD));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,101 @@
|
||||
package com.yizhuan.erban.ui.im.chat;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.netease.nim.uikit.business.session.viewholder.MsgViewHolderBase;
|
||||
import com.netease.nim.uikit.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter;
|
||||
|
||||
import com.yinyuan.xchat_android_core.redpackage.RedPackageNotifyInfo;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||
import com.yizhuan.xchat_android_core.DemoCache;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RedPackageAttachment;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.utils.CurrentTimeUtils;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by zhoujianghua on 2015/8/4.
|
||||
*/
|
||||
public class MsgViewHolderRedPackage extends MsgViewHolderBase {
|
||||
|
||||
public MsgViewHolderRedPackage(BaseMultiItemFetchLoadAdapter adapter) {
|
||||
super(adapter);
|
||||
}
|
||||
|
||||
private TextView tvNickname;
|
||||
private TextView tvAll;
|
||||
private TextView tvTip;
|
||||
private int halfHour = 60 * 30 * 1000;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getContentResId() {
|
||||
return R.layout.message_item_red_package;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void inflateContentView() {
|
||||
tvNickname = findViewById(R.id.tv_nickname);
|
||||
tvAll = findViewById(R.id.tv_all);
|
||||
tvTip = findViewById(R.id.tv_tip);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void bindContentView() {
|
||||
Map<String, Long> map = DemoCache.readRedPackage();
|
||||
RedPackageAttachment attachment = (RedPackageAttachment) message.getAttachment();
|
||||
RedPackageNotifyInfo notifyInfo = attachment.getRedPackageNotifyInfo();
|
||||
String id = notifyInfo.getRedEnvelopeId();
|
||||
LogUtils.d("getTime = " + message.getTime());
|
||||
if (map != null && map.containsKey(id)) { //已领取
|
||||
tvNickname.setText("红包已领取");
|
||||
tvAll.setVisibility(View.GONE);
|
||||
tvTip.setText("可前往账单查看详情");
|
||||
contentContainer.setAlpha(0.5f);
|
||||
} else if (CurrentTimeUtils.getCurrentTime() - message.getTime() < halfHour) {
|
||||
tvNickname.setText(notifyInfo.getSendUserNick());
|
||||
tvAll.setText("发出了一个全服红包");
|
||||
tvAll.setVisibility(View.VISIBLE);
|
||||
tvTip.setText("点击进房领取>");
|
||||
contentContainer.setAlpha(1f);
|
||||
DialogManager.OkCancelDialogListener listener = () -> AVRoomActivity.start(context, notifyInfo.getRoomUid(),
|
||||
AVRoomActivity.FROM_TYPE_ALL_RED, notifyInfo.getSendUserNick(), notifyInfo);
|
||||
contentContainer.setOnClickListener(v -> {
|
||||
if (AvRoomDataManager.get().isOwnerOnMic() && AvRoomDataManager.get().getRoomId() != notifyInfo.getRoomUid()) {
|
||||
new DialogManager(context).showOkCancelDialog("是否下麦退出当前房间?", true, listener);
|
||||
} else {
|
||||
listener.onOk();
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
} else {//已失效
|
||||
tvNickname.setText("红包已失效");
|
||||
tvAll.setVisibility(View.GONE);
|
||||
tvTip.setText("下次要快点来哦~");
|
||||
contentContainer.setAlpha(0.5f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onItemClick() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected int leftBackground() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected int rightBackground() {
|
||||
return 0;
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 542 B |
BIN
app/src/main/res/drawable-xhdpi/ic_redpackage_bigdiamond.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_redpackage_diamond.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 57 KiB |
BIN
app/src/main/res/drawable-xhdpi/room_red_package_bg.webp
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 301 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 324 KiB |
Before Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-xhdpi/room_red_package_help.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 324 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 22 KiB |
8
app/src/main/res/drawable/bg_give_gold_password.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:topLeftRadius="25dp"
|
||||
android:topRightRadius="25dp"
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp" />
|
||||
<solid android:color="#fff5f5f5" />
|
||||
</shape>
|
@@ -3,7 +3,9 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@drawable/bg_give_gold_password"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_main_password"
|
||||
@@ -33,8 +35,8 @@
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:text="请输入支付密码"
|
||||
android:textColor="@color/color_000000"
|
||||
android:textSize="18dp" />
|
||||
android:textColor="@color/color_black_333333"
|
||||
android:textSize="16dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
@@ -51,8 +53,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:drawableLeft="@drawable/ic_redpackage_bigdiamond"
|
||||
android:layout_marginTop="3dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="#333333"
|
||||
tools:text="20000"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:textSize="28sp" />
|
||||
|
||||
<TextView
|
||||
@@ -84,7 +91,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_margin="15dp"
|
||||
android:layout_margin="13dp"
|
||||
android:text="忘记密码?"
|
||||
android:textColor="#EA3B36" />
|
||||
</LinearLayout>
|
||||
|
@@ -163,7 +163,7 @@
|
||||
<string name="charge_webchat">微信支付</string>
|
||||
<string name="charge_alipay">支付宝</string>
|
||||
<string name="charge_cd_code">兑换码充值</string>
|
||||
<string name="charge_diamond">钻石兑换钻石</string>
|
||||
<string name="charge_diamond">充值钻石</string>
|
||||
<string name="charge">充值</string>
|
||||
<string name="charge_number">%d元</string>
|
||||
<string name="charge_sure">确认充值</string>
|
||||
|
@@ -64,11 +64,13 @@
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.8111" />
|
||||
|
||||
<ImageView
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_width="@dimen/dp_2"
|
||||
app:cborder_color="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line1" />
|
||||
|
@@ -45,6 +45,8 @@
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.6278" />
|
||||
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="100dp"
|
||||
@@ -106,6 +108,13 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line0_opened"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.098" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line1_opened"
|
||||
android:layout_width="0dp"
|
||||
@@ -118,14 +127,14 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.2722" />
|
||||
app:layout_constraintGuide_percent="0.3000" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line3_opened"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.44" />
|
||||
app:layout_constraintGuide_percent="0.378" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line4"
|
||||
@@ -141,14 +150,43 @@
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<ImageView
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar_opened"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_color="@color/white"
|
||||
app:cborder_width="@dimen/dp_2"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_nickname_opened"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line2_opened" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamond_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="88"
|
||||
android:textColor="#454545"
|
||||
android:textSize="40sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:drawableStart="@drawable/ic_redpackage_bigdiamond"
|
||||
android:drawablePadding="6dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/line0_opened"
|
||||
app:layout_constraintVertical_bias="0.66" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:text="已存入钱包,请到我的收益确认"
|
||||
android:textColor="#FF9DA6"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line1_opened" />
|
||||
|
||||
<TextView
|
||||
@@ -194,22 +232,9 @@
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line2_opened" />
|
||||
app:layout_constraintTop_toBottomOf="@id/line3_opened" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamond_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
tools:text="88"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="40sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_tips"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_diamond"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_content_opened"
|
||||
app:layout_constraintVertical_bias="0.66" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_gift"
|
||||
@@ -224,28 +249,7 @@
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/item_red_package_gift_top" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamond"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="水晶"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/tv_diamond_num"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_diamond_num" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:text="已存入钱包,请到我的收益确认"
|
||||
android:textColor="#80ffffff"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line3_opened" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_no_get"
|
||||
@@ -265,7 +269,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="65dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:includeFontPadding="false"
|
||||
android:text="领取200/200个"
|
||||
android:textColor="#80ffffff"
|
||||
|
@@ -43,7 +43,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.3667" />
|
||||
app:layout_constraintGuide_percent="0.3580" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line4"
|
||||
@@ -75,7 +75,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:text="厅内红包"
|
||||
android:textColor="#ffffffff"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_all_red"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -98,7 +98,7 @@
|
||||
android:layout_marginEnd="40dp"
|
||||
android:alpha="0.5"
|
||||
android:text="全服红包"
|
||||
android:textColor="#ffffff"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_room_red"
|
||||
@@ -174,6 +174,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:visibility="gone"
|
||||
android:text="当前为手气红包,"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="10sp"
|
||||
@@ -187,6 +188,7 @@
|
||||
android:text="改为礼物红包"
|
||||
android:textColor="#FECF00"
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_red_type_hint"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_red_type_hint"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_red_type_hint" />
|
||||
@@ -253,8 +255,8 @@
|
||||
android:layout_marginTop="3dp"
|
||||
android:alpha="0.5"
|
||||
android:text="红包总金额不低于100钻石,且必须为100的倍数"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="10sp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintStart_toStartOf="@id/cl_gold_num"
|
||||
app:layout_constraintTop_toBottomOf="@id/cl_gold_num" />
|
||||
|
||||
@@ -322,16 +324,13 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_balance"
|
||||
<ImageView
|
||||
android:id="@+id/iv_balance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
android:text="钻石:"
|
||||
android:alpha="0.5"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="13sp"
|
||||
android:src="@drawable/ic_redpackage_diamond"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
@@ -339,11 +338,12 @@
|
||||
android:id="@+id/tv_balance_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_balance"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_balance"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_balance"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:includeFontPadding="false"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_balance"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_balance"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_balance"
|
||||
tools:text="12531" />
|
||||
|
||||
<TextView
|
||||
@@ -353,9 +353,9 @@
|
||||
android:layout_marginEnd="50dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
android:autoLink="all"
|
||||
android:text="充值钻石"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="13sp"
|
||||
android:text="@string/charge_diamond"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -9,13 +9,15 @@
|
||||
tools:layout_width="200dp"
|
||||
tools:background="#fd2772">
|
||||
|
||||
<ImageView
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_width="1dp"
|
||||
app:cborder_color="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -55,20 +57,15 @@
|
||||
android:text="88"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="20sp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:drawableEnd="@drawable/ic_redpackage_diamond"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_diamond"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamond"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="水晶"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/tv_diamond_num"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_gift"
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="95dp"
|
||||
android:background="@drawable/nim_bg_message_red_package">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_red"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="22dp"
|
||||
android:layout_marginTop="9dp"
|
||||
android:src="@drawable/nim_ic_red_package"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_all"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_red"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="风吹来风吹来的少女风吹来的少女风吹来的少女的少女" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="发出了一个全服红包"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/line"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_nickname"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_nickname" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="下次要快点来哦~"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/line"
|
||||
app:layout_constraintTop_toBottomOf="@id/line" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 7.4 KiB |
@@ -249,6 +249,9 @@ import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUS
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_QUEUING_MIC_MODE_CLOSE;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_QUEUING_MIC_MODE_OPEN;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_QUEUING_MIC_NON_EMPTY;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_DIAMOND;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_GIFT;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_MSG;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_TYPE_MONSTER_HUNTING;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_ADD_BLACK;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_KICK_ROOM;
|
||||
@@ -1206,6 +1209,18 @@ public final class IMNetEaseManager {
|
||||
}
|
||||
break;
|
||||
|
||||
case CustomAttachment.CUSTOM_MSG_RED_PACKAGE:
|
||||
switch (second) {
|
||||
case CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_GIFT:
|
||||
case CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_DIAMOND:
|
||||
noticeRoomEvent(msg, RoomEvent.RECEIVE_RED_PACKAGE);
|
||||
break;
|
||||
case CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_MSG:
|
||||
addMessages(msg);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
}
|
||||
} else if (msg.getMsgType() == MsgTypeEnum.text) {
|
||||
@@ -1261,6 +1276,13 @@ public final class IMNetEaseManager {
|
||||
.setMonsterAwardAttachment(monsterAwardAttachment));
|
||||
}
|
||||
|
||||
private void noticeRoomEvent(ChatRoomMessage message, int eventID) {
|
||||
getChatRoomEventObservable().onNext(new RoomEvent()
|
||||
.setEvent(eventID)
|
||||
.setChatRoomMessage(message)
|
||||
);
|
||||
}
|
||||
|
||||
private void noticeReceivedKickRoom(RoomQueueMsgAttachment attachment) {
|
||||
getChatRoomEventObservable()
|
||||
.onNext(new RoomEvent()
|
||||
|