honghengqiang 2 years ago
parent
commit
aa4384f3c9

+ 2 - 2
app/build.gradle

@@ -15,8 +15,8 @@ android {
         applicationId "com.swago.app"
         minSdkVersion 21
         targetSdkVersion 30
-        versionCode 6009
-        versionName "6.0.0.9"
+        versionCode 6010
+        versionName "6.0.1.0"
         multiDexEnabled true
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 

+ 15 - 0
baseswago/src/main/java/com/swago/baseswago/model/live/gift/GiftModel.java

@@ -25,6 +25,7 @@ public class GiftModel implements Parcelable {
     private int gift_mode;
     private String gift_en_name;
     private String gift_id_name;
+    private String gift_ar_name;
     private boolean isSelected;
 
     protected GiftModel(Parcel in) {
@@ -36,6 +37,7 @@ public class GiftModel implements Parcelable {
         gift_mode = in.readInt();
         gift_en_name = in.readString();
         gift_id_name = in.readString();
+        gift_ar_name = in.readString();
     }
 
     public static final Creator<GiftModel> CREATOR = new Creator<GiftModel>() {
@@ -126,6 +128,18 @@ public class GiftModel implements Parcelable {
         this.gift_id_name = gift_id_name;
     }
 
+    public String getGift_ar_name() {
+        if (gift_ar_name==null){
+            return "";
+        }else {
+            return gift_ar_name;
+        }
+    }
+
+    public void setGift_ar_name(String gift_ar_name) {
+        this.gift_ar_name = gift_ar_name;
+    }
+
     public boolean isSelected() {
         return isSelected;
     }
@@ -149,5 +163,6 @@ public class GiftModel implements Parcelable {
         dest.writeInt(gift_mode);
         dest.writeString(gift_en_name);
         dest.writeString(gift_id_name);
+        dest.writeString(gift_ar_name);
     }
 }

+ 7 - 0
room/src/main/java/com/swago/room/gift/GiftAdapter.kt

@@ -30,6 +30,13 @@ class GiftAdapter(private val type: Int, layoutResId: Int, data: ArrayList<GiftM
                 "zh" -> {
                     setText(R.id.tvName, item.gift_name)
                 }
+                "ar" -> {
+                    if(item.gift_ar_name.isNotEmpty()){
+                        setText(R.id.tvName, item.gift_ar_name)
+                    }else{
+                        setText(R.id.tvName, item.gift_en_name)
+                    }
+                }
                 else -> {
                     setText(R.id.tvName, item.gift_en_name)
                 }

+ 22 - 18
room/src/main/res/layout/layout_user_header_view.xml

@@ -88,24 +88,6 @@
             app:layout_constraintBottom_toBottomOf="@+id/cl"
             android:layout_width="wrap_content"
             android:layout_height="30dp"/>
-
-        <com.swago.baseswago.cusview.RegularTextView
-            android:id="@+id/tvTime"
-            android:textSize="8dp"
-            android:textColor="#fff"
-            app:layout_constraintBottom_toBottomOf="parent"
-            android:layout_marginBottom="5dp"
-            android:maxWidth="120dp"
-            android:layout_marginStart="-20dp"
-            app:layout_constraintStart_toEndOf="@+id/ll"
-            tools:text="23min"
-            android:visibility="gone"
-            tools:visibility="visible"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"/>
-
-
-
     </androidx.constraintlayout.widget.ConstraintLayout>
 
     <androidx.recyclerview.widget.RecyclerView
@@ -205,4 +187,26 @@
 
     </LinearLayout>
 
+    <com.swago.baseswago.cusview.RegularTextView
+        android:id="@+id/tvTime"
+        android:textSize="12dp"
+        android:textColor="#fff"
+        android:background="@drawable/shape_20000000_41"
+        android:maxWidth="120dp"
+        tools:text="23min"
+        android:paddingStart="8dp"
+        android:paddingEnd="8dp"
+        android:paddingTop="2dp"
+        android:paddingBottom="2dp"
+        android:visibility="gone"
+        tools:visibility="visible"
+        app:layout_constraintTop_toBottomOf="@+id/cl"
+        android:layout_marginStart="12dp"
+        app:layout_constraintStart_toEndOf="@+id/clHot"
+        android:orientation="horizontal"
+        android:layout_marginTop="10dp"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"/>
+
+
 </androidx.constraintlayout.widget.ConstraintLayout>