This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @param v 需要处理的textview | |
* @param content 要处理的类容 | |
* @param show_len 需要显示的长度 | |
* @return | |
*/ | |
public static String dealDetailString(TextView v,String content,float show_len){ | |
TextPaint tpaint =v.getPaint(); | |
String temp=""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 将毫秒时间转换成时分秒 | |
* @param totalTime | |
* @return | |
*/ | |
public String formatTime(int totalTime){ | |
int hour = 0; | |
int minute = 0; | |
int second = 0; | |
second = totalTime / 1000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static String getMethodName(String fildeName){ | |
byte[] items = fildeName.getBytes(); | |
items[0] = (byte)((char)items[0]-'a'+'A');; | |
return new String(items); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @return String with special XML characters escaped. | |
*/ | |
public static String escapeXml(String s) { | |
StringBuilder sb = new StringBuilder(); | |
for (int i = 0, len = s.length(); i < len; ++i) { | |
char c = s.charAt(i); | |
switch (c) { | |
case '<': sb.append("<"); break; | |
case '>': sb.append(">"); break; |
NewerOlder