We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df841e1 commit d54e55cCopy full SHA for d54e55c
android_app/app/src/main/java/com/health/openscale/gui/table/StickyHeaderTableView.java
@@ -608,7 +608,8 @@ private void updateMaxWidthHeightOfCell() {
608
if (str.indexOf("\n") != -1) {
609
String[] split = str.split("\n");
610
611
- if (split[0].length() >= split[1].length()) {
+ // split.length == 1 handle the case when str has only 1 \n and it is at the end.
612
+ if (split.length == 1 || split[0].length() >= split[1].length()) {
613
str = split[0];
614
} else {
615
str = split[1];
0 commit comments