Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public String key() {
}

@Override
public char character() {
return character;
public String character() {
return String.valueOf(character);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ public String key() {
}

@Override
public char character() {
return character;
public String character() {
return String.valueOf(character);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ public String key() {
}

@Override
public char character() {
return character;
public String character() {
return String.valueOf(character);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ public String key() {
}

@Override
public char character() {
return character;
public String character() {
return String.valueOf(character);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ public String key() {
}

@Override
public char character() {
return character;
public String character() {
return String.valueOf(character);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public String key() {
}

@Override
public char character() {
return character;
public String character() {
return String.valueOf(character);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public String key() {
}

@Override
public char character() {
return character;
public String character() {
return String.valueOf(character);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public String key() {
}

@Override
public char character() {
return character;
public String character() {
return String.valueOf(character);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ public String key() {
}

@Override
public char character() {
return character;
public String character() {
return String.valueOf(character);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public interface Icon {
/** The key of icon, for example 'fa-ok' */
String key();

/** The character matching the key in the font, for example '\u4354' */
char character();
/** The character matching the key in the font, for example String.valueOf('\u4354') or in case
* of characters outside the initial Basic Multilingual Plane, simply "\uD83D\uDC64" */
String character();

}
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ public void draw(Canvas canvas) {
int height = bounds.height();
paint.setTextSize(height);
Rect textBounds = new Rect();
String textValue = String.valueOf(icon.character());
paint.getTextBounds(textValue, 0, 1, textBounds);
String textValue = icon.character();
paint.getTextBounds(textValue, 0, textValue.length(), textBounds);
int textHeight = textBounds.height();
float textBottom = bounds.top + (height - textHeight) / 2f + textHeight - textBounds.bottom;
canvas.drawText(textValue, bounds.exactCenterX(), textBottom, paint);
Expand Down