礼物条目的标题头 英文的改回原来的逻辑

This commit is contained in:
ningwenqiang 2024-09-29 10:57:35 +08:00
parent 2b6ba78500
commit c42b3db7d2
5 changed files with 62 additions and 8 deletions

View File

@ -6,7 +6,7 @@
android:background="@color/transparent"
android:orientation="vertical"
tools:ignore="MissingDefaultResource">
<!--弃用 -->
<View
android:id="@+id/to_can"
android:layout_width="match_parent"

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="351dp"
android:background="@color/transparent"
android:orientation="vertical"
tools:ignore="MissingDefaultResource">
<View
android:id="@+id/to_can"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:layout_width="100dp"
android:layout_height="246dp"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="48dp"
android:layout_marginBottom="50dp"
android:background="@drawable/bg_selection_quantity"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/gift_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:clickable="true"
android:id="@+id/custom_quantity"
android:layout_width="match_parent"
android:layout_height="28dp"
android:gravity="center"
android:layout_marginTop="2dp"
android:text="@string/custom_quantity"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:focusable="true" />
</LinearLayout>
</RelativeLayout>

View File

@ -8,6 +8,7 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.live.R;
import com.yunbao.live.bean.GiftTopBean;
import com.yunbao.live.views.GiftTitleViewHolder;
@ -16,6 +17,7 @@ import net.lucode.hackware.magicindicator.buildins.UIUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
/**
*
@ -38,10 +40,15 @@ public class GiftTitleAdapter extends RecyclerView.Adapter {
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gift_top_new, parent, false);
View herdView;
if (IMLoginManager.get(parent.getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gift_top_new, parent, false);
ViewGroup.LayoutParams layoutParams = herdView.getLayoutParams();
layoutParams.width = getItemWidth(parent.getContext());
herdView.setLayoutParams(layoutParams);
} else {
herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gift_top, parent, false);
}
return new GiftTitleViewHolder(herdView);
}

View File

@ -998,17 +998,17 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
BigDecimal maxLeve = new BigDecimal(coinModel.getUserLevelUpgrades()).add(new BigDecimal(coinModel.getUserLevelCurrentConsumption()));
try {
String leveNext = String.valueOf(nextLeve);
String userNextLevel = coinModel.getUserLevelUpgrades();
String userNextLevel = String.valueOf(Integer.parseInt(coinModel.getUserLevel())+1);
StringBuffer stringBuffer = new StringBuffer();
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
stringBuffer.append("升至Lv")
.append(coinModel.getUserLevel()+1)
.append(userNextLevel)
.append("還需")
.append(leveNext)
.append("經驗值");
} else {
stringBuffer.append("Up to Lv")
.append(coinModel.getUserLevel()+1)
.append(userNextLevel)
.append("need")
.append(leveNext)
.append("experience");

View File

@ -12,6 +12,7 @@
android:paddingLeft="20dp"
android:paddingRight="10dp"
android:text="@string/live_wrap"
android:textStyle="bold"
android:textColor="@color/white"
android:textSize="14sp"
/>