Prefs: limit callsign entry to 6; fix #163

pull/227/head
Georg Lukas 2018-10-22 13:41:15 +02:00
rodzic 88408aedf3
commit 5d2230ac14
3 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -17,6 +17,7 @@
android:singleLine="true"
android:inputType="textCapCharacters"
android:digits="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-"
android:maxLength="9"
android:hint="@string/p_callsign"
/>
<EditText

Wyświetl plik

@ -9,6 +9,7 @@
android:key="callsign"
android:inputType="textCapCharacters"
android:digits="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
android:maxLength="6"
android:title="@string/p_callsign_nossid"
android:summary="@string/p_callsign_summary"
android:hint="@string/p_callsign_nossid"

Wyświetl plik

@ -23,7 +23,7 @@ class PrefsWrapper(val context : Context) {
}
// return commonly used prefs
def getCallsign() = prefs.getString("callsign", "").trim().toUpperCase()
def getCallsign() = prefs.getString("callsign", "").trim().slice(0, 6).toUpperCase()
def getPasscode() = prefs.getString("passcode", "") match {
case "" => "-1"