完成对 MTA 已有统计事件的优化,新事件待补充 http://gitlab.ghzhushou.com/pm/halo-app-issues/issues/316

This commit is contained in:
chenjuntao
2018-08-23 09:56:59 +08:00
parent 772549e543
commit ee1ddbcdce
9 changed files with 41 additions and 16 deletions

View File

@ -1,5 +1,6 @@
package com.gh.common.util;
import android.text.Html;
import android.text.TextUtils;
/**
@ -34,7 +35,10 @@ public class StringUtils {
public static String combineTwoString(String displayName, String description) {
if (TextUtils.isEmpty(displayName) || TextUtils.isEmpty(description)) return "";
displayName = Html.fromHtml(displayName).toString();
if (displayName.length() > 30) {
displayName = displayName.substring(0, 30) + "...";
}
@ -44,7 +48,7 @@ public class StringUtils {
/**
* 截取字符串部分长度,超出的以 "..." 代替
*
* @param text 字符串内容
* @param text 字符串内容
* @param maxLength 最大长度
* @return 修饰后的字符串
*/