liuzhenxing1118 2 年之前
父节点
当前提交
89398257ef

+ 2 - 6
app/src/main/java/com/xplora/xpchat/utils/ToolsUtils.java

@@ -151,16 +151,12 @@ public class ToolsUtils {
             String format = timeFormat == 0 ? "hh:mm aa" : "HH:mm";
             SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.getDefault());
             return sdf.format(new Date(chatTime * 1000L));
-        } else if (interval < 7 * 24 * 60 * 60) {
-            String format = timeFormat == 0 ? "EEE hh:mm aa" : "EEE HH:mm";
-            SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.getDefault());
-            return sdf.format(new Date(chatTime * 1000L));
         } else if (lastYear != nowYear) {
-            String format = "dd/MM/yyyy";
+            String format = "dd MMM yyyy";
             SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.getDefault());
             return sdf.format(new Date(chatTime * 1000L));
         } else {
-            String format = timeFormat == 0 ? "dd/MM hh:mm aa" : "dd/MM HH:mm";
+            String format = "dd MMM";
             SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.getDefault());
             return sdf.format(new Date(chatTime * 1000L));
         }

+ 2 - 1
app/src/main/res/layout/item_other_emoji.xml

@@ -21,7 +21,8 @@
             android:textFontWeight="500"
             android:textSize="9dp"
             android:textColor="@color/white"
-            android:text="app name"
+            android:maxLength="10"
+            android:ellipsize="end"
             />
 
         <TextView

+ 2 - 1
app/src/main/res/layout/item_other_photo.xml

@@ -21,7 +21,8 @@
             android:textFontWeight="500"
             android:textSize="9dp"
             android:textColor="@color/white"
-            android:text="app name"
+            android:maxLength="10"
+            android:ellipsize="end"
             />
 
         <TextView

+ 2 - 0
app/src/main/res/layout/item_other_text.xml

@@ -21,6 +21,8 @@
             android:textFontWeight="500"
             android:textSize="9dp"
             android:textColor="@color/white"
+            android:maxLength="10"
+            android:ellipsize="end"
             />
 
         <TextView

+ 2 - 1
app/src/main/res/layout/item_other_video.xml

@@ -21,7 +21,8 @@
             android:textFontWeight="500"
             android:textSize="9dp"
             android:textColor="@color/white"
-            android:text="app name"
+            android:maxLength="10"
+            android:ellipsize="end"
             />
 
         <TextView

+ 2 - 1
app/src/main/res/layout/item_other_voice.xml

@@ -22,7 +22,8 @@
             android:textFontWeight="500"
             android:textSize="9dp"
             android:textColor="@color/white"
-            android:text="app name"
+            android:maxLength="10"
+            android:ellipsize="end"
             />
 
         <TextView