From 5e180f7fc1623b386911af63fa373fd8fe3f7c35 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 5 Feb 2017 20:10:58 +0100 Subject: [PATCH] limit event title length to 50 chars --- .../kotlin/com/simplemobiletools/calendar/helpers/IcsParser.kt | 1 + app/src/main/res/layout/activity_event.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsParser.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsParser.kt index 603a8053a..bddf71fcf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsParser.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/IcsParser.kt @@ -49,6 +49,7 @@ class IcsParser { curEnd = getTimestamp(line.substring(DTEND.length)) } else if (line.startsWith(SUMMARY)) { curTitle = line.substring(SUMMARY.length) + curTitle = curTitle.substring(0, Math.min(curTitle.length, 50)) } else if (line.startsWith(DESCRIPTION)) { curDescription = line.substring(DESCRIPTION.length) } else if (line.startsWith(UID)) { diff --git a/app/src/main/res/layout/activity_event.xml b/app/src/main/res/layout/activity_event.xml index 5fb2631d3..a5243a988 100644 --- a/app/src/main/res/layout/activity_event.xml +++ b/app/src/main/res/layout/activity_event.xml @@ -20,7 +20,7 @@ android:layout_marginTop="@dimen/activity_margin" android:hint="@string/title" android:inputType="textCapSentences" - android:maxLength="30" + android:maxLength="50" android:maxLines="1" android:minEms="20" android:textCursorDrawable="@null"