fix [分享直播和动态改成叫【站内分享】]
This commit is contained in:
@@ -48,7 +48,26 @@ public class WordUtil {
|
||||
sResources.updateConfiguration(tmp, sResources.getDisplayMetrics());
|
||||
return str;
|
||||
}
|
||||
|
||||
public static String getChineseString(int res) {
|
||||
Configuration config = new Configuration();
|
||||
Configuration tmp = sResources.getConfiguration();
|
||||
config.setToDefaults();
|
||||
config.locale = Locale.TRADITIONAL_CHINESE;
|
||||
sResources.updateConfiguration(config, sResources.getDisplayMetrics());
|
||||
String str = sResources.getString(res);
|
||||
sResources.updateConfiguration(tmp, sResources.getDisplayMetrics());
|
||||
return str;
|
||||
}
|
||||
public static String getEnglishString(int res) {
|
||||
Configuration config = new Configuration();
|
||||
Configuration tmp = sResources.getConfiguration();
|
||||
config.setToDefaults();
|
||||
config.locale = Locale.ENGLISH;
|
||||
sResources.updateConfiguration(config, sResources.getDisplayMetrics());
|
||||
String str = sResources.getString(res);
|
||||
sResources.updateConfiguration(tmp, sResources.getDisplayMetrics());
|
||||
return str;
|
||||
}
|
||||
/**
|
||||
* 是否包含特殊字符
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user