Поддержка тегов big/small

This commit is contained in:
Victor 2015-05-03 15:51:05 +03:00
parent 2027be94ee
commit 2bdae6bdc2

View File

@ -406,10 +406,10 @@ public final class ViewActivity extends Activity implements TouchGesture.OnTouch
private Spannable formatString(String text) { private Spannable formatString(String text) {
String edited = text.replaceAll("\\{w.*?\\}", ""); String edited = text.replaceAll("\\{w.*?\\}", "");
final char[] codes = {'b','i','s','u'}; final String[] codes = {"b","i","s","u","big","small"};
boolean html = false; boolean html = false;
for (int i = 0; i < codes.length; i++) { for (int i = 0; i < codes.length; i++) {
final char ch = codes[i]; final String ch = codes[i];
if (edited.contains("{"+ch+"}")) { if (edited.contains("{"+ch+"}")) {
edited = edited.replace("{"+ch+"}", "<"+ch+">"); edited = edited.replace("{"+ch+"}", "<"+ch+">");
edited = edited.replace("{/"+ch+"}", "</"+ch+">"); edited = edited.replace("{/"+ch+"}", "</"+ch+">");