mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-19 13:49:13 +00:00
allow entering minus and nothing (same as 0)
This commit is contained in:
parent
f7c694bfe0
commit
044f6dd81c
2 changed files with 3 additions and 3 deletions
|
@ -262,14 +262,14 @@ private fun toolbarKeyCustomizer(context: Context, key: ToolbarKey) {
|
|||
layout.findViewById<EditText>(R.id.toolbar_key_code)?.apply {
|
||||
setText(getCodeForToolbarKey(key).toString())
|
||||
doAfterTextChanged {
|
||||
keyCode = it?.toString()
|
||||
keyCode = it?.toString()?.ifEmpty { "0" }
|
||||
checkOk()
|
||||
}
|
||||
}
|
||||
layout.findViewById<EditText>(R.id.toolbar_key_longpress_code)?.apply {
|
||||
setText(getCodeForToolbarKeyLongClick(key).toString())
|
||||
doAfterTextChanged {
|
||||
longpressCode = it?.toString()
|
||||
longpressCode = it?.toString()?.ifEmpty { "0" }
|
||||
checkOk()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
android:id="@+id/toolbar_key_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:inputType="numberSigned"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
|
|
Loading…
Add table
Reference in a new issue