From ca6de339438364963428e16146765d367ce488e5 Mon Sep 17 00:00:00 2001 From: geeksville Date: Wed, 24 Jun 2020 14:58:56 -0700 Subject: [PATCH] Allow user to enter only a very restricted list of channel name chars (for now - possibly loosen in the future - someone reported the device code didn't like odd characters, and we definitely don't want anything >127). Also, shrink length to 11 chars (which is 12 including the nul terminator on the device side (current limit in mesh.options). --- app/src/main/res/layout/channel_fragment.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/layout/channel_fragment.xml b/app/src/main/res/layout/channel_fragment.xml index 9a27e3c4b..d2f411259 100644 --- a/app/src/main/res/layout/channel_fragment.xml +++ b/app/src/main/res/layout/channel_fragment.xml @@ -20,9 +20,10 @@ android:id="@+id/channelNameEdit" android:layout_width="match_parent" android:layout_height="wrap_content" + android:digits="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890- " android:hint="@string/channel_name" android:imeOptions="actionDone" - android:maxLength="12" + android:maxLength="11" android:singleLine="true" android:text="@string/unset" />