RTL适配:送礼公屏
This commit is contained in:
@@ -64,6 +64,7 @@ import com.chwl.app.utils.ObjectTypeHelper;
|
||||
import com.chwl.core.im.custom.bean.TemplateMessageAttachment;
|
||||
import com.chwl.core.monsterhunting.bean.MonsterDataBean;
|
||||
import com.chwl.core.utils.extension.StringExtensionKt;
|
||||
import com.example.lib_utils.UiUtils;
|
||||
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;
|
||||
@@ -841,6 +842,10 @@ public class MessageView extends FrameLayout {
|
||||
tvContent.setOnClickListener(this);
|
||||
tvContent.setOnLongClickListener(null);
|
||||
tvContent.setTag(chatRoomMessage);
|
||||
tvContent.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);
|
||||
if (UiUtils.INSTANCE.isRtl(tvContent.getContext())) {
|
||||
tvContent.setTextDirection(View.TEXT_DIRECTION_RTL);
|
||||
}
|
||||
clearBackground(tvContent);
|
||||
try {
|
||||
if (chatRoomMessage.getMsgType() == MsgTypeEnum.tip) {
|
||||
@@ -2443,7 +2448,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
})
|
||||
.append(ResUtil.getString(R.string.avroom_widget_messageview_0126), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append(ResUtil.getString(R.string.gift_message_01), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append(giftInfo == null ? "" : giftInfo.getGiftUrl(), giftLength, giftLength)
|
||||
.append("X" + giftAttachment.getMultiGiftReceiveInfo().getGiftNum(), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
tvContent.setText(text.build());
|
||||
@@ -2479,9 +2484,9 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
})
|
||||
.append(ResUtil.getString(R.string.avroom_widget_messageview_0127), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
.append(ResUtil.getString(R.string.gift_message_01), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
|
||||
text.append(luckyGiftInfo.getGiftName() + ResUtil.getString(R.string.avroom_widget_messageview_0128), 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)))
|
||||
.append(luckyGiftInfo.getUser().getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
@@ -2490,10 +2495,10 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
});
|
||||
text.append(ResUtil.getString(R.string.avroom_widget_messageview_0129));
|
||||
text.append(ResUtil.getString(R.string.gift_message_04));
|
||||
for (GiftList luckyGiftList : luckyGiftInfo.getGiftList()) {
|
||||
if (luckyGiftList.getGiftInfo() == null) continue;
|
||||
text.append(ResUtil.getString(R.string.avroom_widget_messageview_0130) + luckyGiftList.getGiftInfo().getGoldPrice() + ResUtil.getString(R.string.avroom_widget_messageview_0131))
|
||||
text.append(ResUtil.getString(R.string.gift_message_03) + luckyGiftList.getGiftInfo().getGoldPrice() + ResUtil.getString(R.string.gift_message_05))
|
||||
.append(luckyGiftList.getGiftInfo().getGiftUrl(), giftLength, giftLength)
|
||||
.append("X" + luckyGiftList.getGiftNum(), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append("、");
|
||||
@@ -2534,9 +2539,9 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
})
|
||||
.append(ResUtil.getString(R.string.avroom_widget_messageview_0132), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
.append(ResUtil.getString(R.string.gift_message_01), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
|
||||
text.append(luckyGiftInfo.getGiftName() + ResUtil.getString(R.string.avroom_widget_messageview_0133), 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)))
|
||||
.append(luckyGiftInfo.getUser().getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
@@ -2545,10 +2550,10 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
});
|
||||
text.append(ResUtil.getString(R.string.avroom_widget_messageview_0134));
|
||||
text.append(ResUtil.getString(R.string.gift_message_04));
|
||||
for (GiftList luckyGiftList : luckyGiftInfo.getGiftList()) {
|
||||
if (luckyGiftList.getGiftInfo() == null) continue;
|
||||
text.append(ResUtil.getString(R.string.avroom_widget_messageview_0135) + luckyGiftList.getGiftInfo().getGoldPrice() + ResUtil.getString(R.string.avroom_widget_messageview_0136))
|
||||
text.append(ResUtil.getString(R.string.gift_message_03) + luckyGiftList.getGiftInfo().getGoldPrice() + ResUtil.getString(R.string.gift_message_05))
|
||||
.append(luckyGiftList.getGiftInfo().getGiftUrl(), giftLength, giftLength)
|
||||
.append("X" + luckyGiftList.getGiftNum(), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append("、");
|
||||
@@ -2557,7 +2562,6 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
Editable msg = text.builder;
|
||||
msg.delete(msg.length() - 1, msg.length());
|
||||
|
||||
tvContent.setText(text.build());
|
||||
tvContent.setOnClickListener(null);
|
||||
tvContent.setMovementMethod(new LinkMovementMethod());
|
||||
@@ -2584,7 +2588,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
})
|
||||
.append(ResUtil.getString(R.string.avroom_widget_messageview_0137), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
.append(ResUtil.getString(R.string.gift_message_06), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
|
||||
for (GiftReceiver targetUser : attachment.getGiftMultiReceiverInfo().getTargetUsers()) {
|
||||
text.append(targetUser.getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
|
||||
@@ -2760,7 +2764,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
})
|
||||
.append(ResUtil.getString(R.string.avroom_widget_messageview_0149), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append(ResUtil.getString(R.string.gift_message_06), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append(targetNick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
|
||||
|
||||
@Override
|
||||
|
@@ -11,9 +11,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/shape_room_message_bg"
|
||||
android:gravity="left|center_vertical"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textColor="@android:color/white"
|
||||
android:textDirection="ltr"
|
||||
android:textSize="12sp"
|
||||
tools:text="@string/layout_list_item_chatrrom_msg_01"
|
||||
tools:textColor="#000" />
|
||||
|
@@ -1717,18 +1717,6 @@
|
||||
<string name="avroom_widget_messageview_0123"> شارك الغرفة</string>
|
||||
<string name="avroom_widget_messageview_0124"> قام بمتابعة المضيف</string>
|
||||
<string name="avroom_widget_messageview_0125"> أضاف الغرفة إلى المفضلة</string>
|
||||
<string name="avroom_widget_messageview_0126">أرسل القمح </string>
|
||||
<string name="avroom_widget_messageview_0127">أرسل القمح </string>
|
||||
<string name="avroom_widget_messageview_0128">إلى</string>
|
||||
<string name="avroom_widget_messageview_0129">، مما أدى إلى</string>
|
||||
<string name="avroom_widget_messageview_0130">قيمة</string>
|
||||
<string name="avroom_widget_messageview_0131">بالنقود</string>
|
||||
<string name="avroom_widget_messageview_0132"> هدية</string>
|
||||
<string name="avroom_widget_messageview_0133">أرسلت إلى </string>
|
||||
<string name="avroom_widget_messageview_0134">، مما أدى إلى</string>
|
||||
<string name="avroom_widget_messageview_0135">قيمة</string>
|
||||
<string name="avroom_widget_messageview_0136">هدية بالنقود</string>
|
||||
<string name="avroom_widget_messageview_0137"> هدية</string>
|
||||
<string name="avroom_widget_messageview_0138">أرسلت إلى </string>
|
||||
<string name="avroom_widget_messageview_0139">قمح ألقى لعنة </string>
|
||||
<string name="avroom_widget_messageview_0140"> و </string>
|
||||
@@ -1740,7 +1728,6 @@
|
||||
<string name="avroom_widget_messageview_0146"> و </string>
|
||||
<string name="avroom_widget_messageview_0147"> معدل نقد </string>
|
||||
<string name="avroom_widget_messageview_0148"> أرسلت إلى </string>
|
||||
<string name="avroom_widget_messageview_0149"> ركوب على </string>
|
||||
<string name="avroom_widget_messageview_0150"> دخل الغرفة</string>
|
||||
<string name="avroom_widget_messageview_0151"> دخل الغرفة وفقًا لتوصية الصفحة الرئيسية</string>
|
||||
<string name="avroom_widget_messageview_0152"> اتبع </string>
|
||||
@@ -5265,4 +5252,11 @@
|
||||
<string name="diamonds_01">(نقود)</string>
|
||||
<string name="total_revenue_01">إجمالي العائدات (نقود)</string>
|
||||
<string name="all_gift_message_format">%1$s يعطي إلى %2$s %3$s</string>
|
||||
|
||||
<string name="gift_message_01">تقديم</string>
|
||||
<string name="gift_message_02">إلى</string>
|
||||
<string name="gift_message_03">قيمة</string>
|
||||
<string name="gift_message_04">,ظهرت</string>
|
||||
<string name="gift_message_05">هدية من العملات الذهبية</string>
|
||||
<string name="gift_message_06">تقديم إلى </string>
|
||||
</resources>
|
@@ -1735,18 +1735,6 @@
|
||||
<string name="avroom_widget_messageview_0123"> 分享了房間</string>
|
||||
<string name="avroom_widget_messageview_0124"> 關註了房主</string>
|
||||
<string name="avroom_widget_messageview_0125"> 收藏了房間</string>
|
||||
<string name="avroom_widget_messageview_0126"> 全麥送出 </string>
|
||||
<string name="avroom_widget_messageview_0127"> 全麥送出 </string>
|
||||
<string name="avroom_widget_messageview_0128">給</string>
|
||||
<string name="avroom_widget_messageview_0129">,爆出了</string>
|
||||
<string name="avroom_widget_messageview_0130">價值</string>
|
||||
<string name="avroom_widget_messageview_0131">金幣的</string>
|
||||
<string name="avroom_widget_messageview_0132"> 送出 </string>
|
||||
<string name="avroom_widget_messageview_0133">給</string>
|
||||
<string name="avroom_widget_messageview_0134">,爆出了</string>
|
||||
<string name="avroom_widget_messageview_0135">價值</string>
|
||||
<string name="avroom_widget_messageview_0136">金幣的禮物</string>
|
||||
<string name="avroom_widget_messageview_0137"> 送給 </string>
|
||||
<string name="avroom_widget_messageview_0138"> 全麥施魔法 </string>
|
||||
<string name="avroom_widget_messageview_0139"> 並 </string>
|
||||
<string name="avroom_widget_messageview_0140"> 觸發暴擊 </string>
|
||||
@@ -1758,7 +1746,6 @@
|
||||
<string name="avroom_widget_messageview_0146"> 施魔法 </string>
|
||||
<string name="avroom_widget_messageview_0147"> 並 </string>
|
||||
<string name="avroom_widget_messageview_0148"> 觸發暴擊 </string>
|
||||
<string name="avroom_widget_messageview_0149"> 送給 </string>
|
||||
<string name="avroom_widget_messageview_0150"> 駕著 </string>
|
||||
<string name="avroom_widget_messageview_0151"> 進入了房間 </string>
|
||||
<string name="avroom_widget_messageview_0152"> 根據首頁推薦進入了房間</string>
|
||||
@@ -5207,4 +5194,11 @@
|
||||
<string name="total_revenue_01">總收入(金幣)</string>
|
||||
<string name="slogan">来遇见你的专属声音</string>
|
||||
<string name="all_gift_message_format">%1$s 送给 %2$s %3$s</string>
|
||||
|
||||
<string name="gift_message_01">送出</string>
|
||||
<string name="gift_message_02">給</string>
|
||||
<string name="gift_message_03">價值</string>
|
||||
<string name="gift_message_04">,爆出了</string>
|
||||
<string name="gift_message_05">金幣的禮物</string>
|
||||
<string name="gift_message_06">送给</string>
|
||||
</resources>
|
@@ -1749,18 +1749,6 @@
|
||||
<string name="avroom_widget_messageview_0121"> Bid</string>
|
||||
<string name="avroom_widget_messageview_0124"> followed the host</string>
|
||||
<string name="avroom_widget_messageview_0125"> bookmarked the room</string>
|
||||
<string name="avroom_widget_messageview_0126"> Wheat sent out </string>
|
||||
<string name="avroom_widget_messageview_0127"> Wheat sent out </string>
|
||||
<string name="avroom_widget_messageview_0128">to</string>
|
||||
<string name="avroom_widget_messageview_0129">, triggering a</string>
|
||||
<string name="avroom_widget_messageview_0130">value</string>
|
||||
<string name="avroom_widget_messageview_0131">of Gold</string>
|
||||
<string name="avroom_widget_messageview_0132"> gift</string>
|
||||
<string name="avroom_widget_messageview_0133"> sent to </string>
|
||||
<string name="avroom_widget_messageview_0134">, triggering a</string>
|
||||
<string name="avroom_widget_messageview_0135">value</string>
|
||||
<string name="avroom_widget_messageview_0136">of Gold Gift</string>
|
||||
<string name="avroom_widget_messageview_0137"> gift</string>
|
||||
<string name="avroom_widget_messageview_0138"> sent to </string>
|
||||
<string name="avroom_widget_messageview_0139"> Wheat cast a spell </string>
|
||||
<string name="avroom_widget_messageview_0140"> and </string>
|
||||
@@ -1772,7 +1760,6 @@
|
||||
<string name="avroom_widget_messageview_0146"> and </string>
|
||||
<string name="avroom_widget_messageview_0147"> triggered a crit </string>
|
||||
<string name="avroom_widget_messageview_0148"> sent to </string>
|
||||
<string name="avroom_widget_messageview_0149"> Riding on </string>
|
||||
<string name="avroom_widget_messageview_0150"> entered the room</string>
|
||||
<string name="avroom_widget_messageview_0151"> entered the room according to the homepage recommendation</string>
|
||||
<string name="avroom_widget_messageview_0152"> followed </string>
|
||||
@@ -5242,6 +5229,13 @@
|
||||
<string name="avroom_widget_messageview_0123">shared room</string>
|
||||
<string name="im_chat_msgviewholdertext_04">A little heart has been sent to the other party~</string>
|
||||
<string name="all_gift_message_format">%1$s give to %2$s %3$s</string>
|
||||
|
||||
<string name="gift_message_01">send out</string>
|
||||
<string name="gift_message_02">give</string>
|
||||
<string name="gift_message_03">value</string>
|
||||
<string name="gift_message_04">, triggering a</string>
|
||||
<string name="gift_message_05">gift of gold coins</string>
|
||||
<string name="gift_message_06">give to</string>
|
||||
</resources>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user