fix:礼物名称 动态适配多语言
This commit is contained in:
@@ -2286,7 +2286,7 @@ public class MessageView extends FrameLayout {
|
||||
})
|
||||
.append(ResUtil.getString(R.string.gift_message_01), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
|
||||
text.append(luckyGiftInfo.getGiftName() + ResUtil.getString(R.string.gift_message_02), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
text.append(luckyGiftInfo.getFirstGiftName() + ResUtil.getString(R.string.gift_message_02), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append(luckyGiftInfo.getUser().getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
@@ -2341,7 +2341,7 @@ public class MessageView extends FrameLayout {
|
||||
})
|
||||
.append(ResUtil.getString(R.string.gift_message_01), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
|
||||
text.append(luckyGiftInfo.getGiftName() + ResUtil.getString(R.string.gift_message_02), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
text.append(luckyGiftInfo.getFirstGiftName() + ResUtil.getString(R.string.gift_message_02), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append(luckyGiftInfo.getUser().getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
|
@@ -71,6 +71,11 @@ public class GiftInfoVm extends BaseItem<GiftInfo> {
|
||||
*/
|
||||
public boolean isSuperLuckyGift;
|
||||
|
||||
/**
|
||||
* 礼物名称
|
||||
*/
|
||||
public String giftName;
|
||||
|
||||
public GiftInfoVm(Context context, GiftInfo data, boolean select, boolean isKnap) {
|
||||
super(context, data);
|
||||
this.isSelect.set(select);
|
||||
@@ -110,6 +115,7 @@ public class GiftInfoVm extends BaseItem<GiftInfo> {
|
||||
SimpleVipInfo vipInfo = data.getGiftVipInfo();
|
||||
isLocked = vipInfo != null && VipHelper.getMyVipLevel() < vipInfo.getVipLevel();
|
||||
vipIcon = vipInfo == null ? "" : vipInfo.getVipIcon();
|
||||
giftName = data.getFirstGiftName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -54,7 +54,7 @@
|
||||
android:layout_below="@id/gift_image"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@{item.data().giftName}"
|
||||
android:text="@{item.giftName}"
|
||||
android:textColor="@{item.isSelect ? @color/color_ffb606 : @color/white}"
|
||||
android:textSize="@dimen/dp_10"
|
||||
android:maxLines="2"
|
||||
|
Reference in New Issue
Block a user