fix财富等级图标
This commit is contained in:
@@ -5,14 +5,6 @@ import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
@@ -29,6 +21,13 @@ import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
|
||||
import com.netease.nim.uikit.business.uinfo.UserInfoHelper;
|
||||
import com.netease.nim.uikit.common.ui.span.RadiusBackgroundSpan;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
@@ -45,13 +44,6 @@ import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
|
||||
import com.netease.nimlib.sdk.msg.model.IMMessage;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.tongdaxing.erban.sadmin.utils.SaAttachmentToMsgUtil;
|
||||
import com.yizhuan.xchat_android_core.gift.GiftModel;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftList;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftListInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftType;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.LuckyBagGifts;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.MultiLuckyGiftAttachment;
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedEnvelopeRoomMsg;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||
@@ -60,8 +52,6 @@ import com.yizhuan.erban.avroom.game.PlayGameActivity;
|
||||
import com.yizhuan.erban.common.widget.CustomImageSpan;
|
||||
import com.yizhuan.erban.common.widget.OriginalDrawStatusClickSpan;
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||
import com.yizhuan.xchat_android_core.home.event.FollowRoomEvent;
|
||||
import com.yizhuan.xchat_android_core.home.model.CollectionRoomModel;
|
||||
import com.yizhuan.erban.ui.widget.DividerItemDecoration;
|
||||
import com.yizhuan.erban.ui.widget.MyItemAnimator;
|
||||
import com.yizhuan.erban.ui.widget.UserInfoDialog;
|
||||
@@ -73,10 +63,15 @@ import com.yizhuan.xchat_android_core.Constants;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.bean.attachmsg.RoomQueueMsgAttachment;
|
||||
import com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.GiftModel;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftList;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftReceiveInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftReceiver;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.LuckyBagGifts;
|
||||
import com.yizhuan.xchat_android_core.helper.ImHelperUtils;
|
||||
import com.yizhuan.xchat_android_core.home.event.FollowRoomEvent;
|
||||
import com.yizhuan.xchat_android_core.home.model.CollectionRoomModel;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.AuctionAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CarveUpGoldAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment;
|
||||
@@ -94,6 +89,7 @@ import com.yizhuan.xchat_android_core.im.custom.bean.MagicBatchAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.MonsterHuntingResultAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.MonsterStatusAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.MultiGiftAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.MultiLuckyGiftAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.MusicInfoAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NobleAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RedPackageRoomMsgAttachment;
|
||||
@@ -122,6 +118,7 @@ import com.yizhuan.xchat_android_core.noble.NobleInfo;
|
||||
import com.yizhuan.xchat_android_core.noble.NobleResourceType;
|
||||
import com.yizhuan.xchat_android_core.noble.NobleUtil;
|
||||
import com.yizhuan.xchat_android_core.praise.PraiseModel;
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedEnvelopeRoomMsg;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomMessageViewNoticeInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.WelcomeInfo;
|
||||
@@ -290,9 +287,9 @@ public class MessageView extends FrameLayout {
|
||||
sysIconHeight = Utils.dip2px(context, 14);
|
||||
smallFace = Utils.dip2px(context, 22);
|
||||
bigFace = Utils.dip2px(context, 30);
|
||||
//经验等级图片后台已经更换尺寸了,公屏同步下,尺寸是25:20
|
||||
//经验等级图片后台已经更换尺寸了,公屏同步下,尺寸是26:20
|
||||
expLevelHeight = Utils.dip2px(context, 20);
|
||||
expLevelWidth = expLevelHeight * 25 / 20;//expLevelHeight * 114 / 45
|
||||
expLevelWidth = expLevelHeight * 26 / 20;//expLevelHeight * 114 / 45
|
||||
giftLength = Utils.dip2px(context, 35);
|
||||
// 内容区域
|
||||
layoutManger = new LinearLayoutManager(context, RecyclerView.VERTICAL, false);
|
||||
@@ -2407,7 +2404,6 @@ public class MessageView extends FrameLayout {
|
||||
SizeUtils.dp2px(tvContent.getContext(), 20));
|
||||
}
|
||||
|
||||
|
||||
text.append(userLevel, expLevelWidth, expLevelHeight);
|
||||
String tvNamePlate = NobleUtil.getNamePlate(UserInfo.NAMEPLATE_WORD, chatRoomMessage).trim();
|
||||
String ivNamePlate = NobleUtil.getNamePlate(UserInfo.NAMEPLATE_PIC, chatRoomMessage);
|
||||
|
@@ -99,8 +99,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_3"
|
||||
android:scaleType="fitXY"
|
||||
android:minWidth="@dimen/dp_25"
|
||||
android:visibility="visible"
|
||||
tools:src="@mipmap/ic_user_level" />
|
||||
|
||||
@@ -108,9 +106,7 @@
|
||||
android:id="@+id/iv_user_charm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:minWidth="@dimen/dp_25"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="visible"
|
||||
tools:src="@drawable/ic_user_charm_level" />
|
||||
|
||||
|
@@ -123,7 +123,7 @@
|
||||
android:id="@+id/in_official_mask"
|
||||
layout="@layout/layout_official_mask"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_17"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="5.5dp"
|
||||
android:visibility="visible" />
|
||||
@@ -131,10 +131,9 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_level"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone"
|
||||
tools:src="@mipmap/ic_user_level"
|
||||
tools:visibility="visible" />
|
||||
@@ -142,10 +141,9 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_charm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone"
|
||||
tools:src="@mipmap/ic_user_level"
|
||||
tools:visibility="visible" />
|
||||
@@ -154,7 +152,7 @@
|
||||
android:id="@+id/in_nameplate"
|
||||
layout="@layout/layout_official_mask"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_17"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="5.5dp"
|
||||
android:visibility="visible" />
|
||||
|
@@ -123,8 +123,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
|
||||
private int limitLevel;
|
||||
private int currentLevel;
|
||||
private int limitRegisterDay;
|
||||
private int currentRegisterDay;
|
||||
|
||||
public InputPanel(Container container, View view, List<BaseAction> actions, boolean isTextAudioSwitchShow) {
|
||||
this.container = container;
|
||||
@@ -419,19 +417,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
private void onTextMessageSendButtonPressed() {
|
||||
String text = messageEditText.getText().toString();
|
||||
if (TextUtils.isEmpty(text.trim())) return;
|
||||
// if (limitLevel <= 1 && currentRegisterDay < limitRegisterDay) {
|
||||
// SingleToastUtil.showToastShort("注册时间满"+limitRegisterDay+"天才能发起聊天");
|
||||
// return;
|
||||
// }
|
||||
// if (currentLevel < limitLevel && limitRegisterDay < 1){
|
||||
// SingleToastUtil.showToastShort("等级满" + limitLevel + "才能发起聊天");
|
||||
// return;
|
||||
// }
|
||||
if (currentRegisterDay < limitRegisterDay && currentLevel < limitLevel){
|
||||
SingleToastUtil.showToastShort("注册时间满" + limitRegisterDay + "天或等级满" + limitLevel + "才能发起聊天");
|
||||
return;
|
||||
}
|
||||
|
||||
EventBus.getDefault().post(new ActiveEvent());
|
||||
IMMessage textMessage = createTextMessage(text);
|
||||
if (AntiSpamUtil.checkLocalAntiSpam(textMessage)) {
|
||||
@@ -975,30 +960,28 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
container.proxy.sendMessage(customMessage);
|
||||
}
|
||||
|
||||
public void setLimitLevel(int limitLevel, int currentLevel,int limitRegisterDay,int currentRegisterDay) {
|
||||
public void setLimitLevel(int limitLevel, int currentLevel) {
|
||||
this.limitLevel = limitLevel;
|
||||
this.currentLevel = currentLevel;
|
||||
this.limitRegisterDay = limitRegisterDay;
|
||||
this.currentRegisterDay = currentRegisterDay;
|
||||
setEditTextState();
|
||||
}
|
||||
|
||||
private void setEditTextState() {
|
||||
// if (currentLevel < limitLevel) {
|
||||
// messageEditText.setHint("用户等级不足" + limitLevel + "级, 不可以发言哦");
|
||||
// messageEditText.setFocusable(false);
|
||||
// messageEditText.setFocusableInTouchMode(false);
|
||||
// messageEditText.setEnabled(false);
|
||||
// moreFuntionButtonInInputBar.setEnabled(false);
|
||||
// sendMessageButtonInInputBar.setEnabled(false);
|
||||
// } else {
|
||||
if (currentLevel < limitLevel) {
|
||||
messageEditText.setHint("用户等级不足" + limitLevel + "级, 不可以发言哦");
|
||||
messageEditText.setFocusable(false);
|
||||
messageEditText.setFocusableInTouchMode(false);
|
||||
messageEditText.setEnabled(false);
|
||||
moreFuntionButtonInInputBar.setEnabled(false);
|
||||
sendMessageButtonInInputBar.setEnabled(false);
|
||||
} else {
|
||||
messageEditText.setHint("请输入消息");
|
||||
messageEditText.setFocusable(true);
|
||||
messageEditText.setFocusableInTouchMode(true);
|
||||
messageEditText.setEnabled(true);
|
||||
moreFuntionButtonInInputBar.setEnabled(true);
|
||||
sendMessageButtonInInputBar.setEnabled(true);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user