1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-21 16:02:04 +02:00

(fix) StickyHeaderTableView: crash on certains starting (#1047)

GH-935
This commit is contained in:
Martin Lavoie
2024-05-20 06:01:36 -03:00
committed by GitHub
parent df841e1a74
commit d54e55cd4c

View File

@@ -608,7 +608,8 @@ public class StickyHeaderTableView extends View implements NestedScrollingChild
if (str.indexOf("\n") != -1) { if (str.indexOf("\n") != -1) {
String[] split = str.split("\n"); String[] split = str.split("\n");
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.
if (split.length == 1 || split[0].length() >= split[1].length()) {
str = split[0]; str = split[0];
} else { } else {
str = split[1]; str = split[1];