mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-20 06:09:09 +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 {
|
layout.findViewById<EditText>(R.id.toolbar_key_code)?.apply {
|
||||||
setText(getCodeForToolbarKey(key).toString())
|
setText(getCodeForToolbarKey(key).toString())
|
||||||
doAfterTextChanged {
|
doAfterTextChanged {
|
||||||
keyCode = it?.toString()
|
keyCode = it?.toString()?.ifEmpty { "0" }
|
||||||
checkOk()
|
checkOk()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
layout.findViewById<EditText>(R.id.toolbar_key_longpress_code)?.apply {
|
layout.findViewById<EditText>(R.id.toolbar_key_longpress_code)?.apply {
|
||||||
setText(getCodeForToolbarKeyLongClick(key).toString())
|
setText(getCodeForToolbarKeyLongClick(key).toString())
|
||||||
doAfterTextChanged {
|
doAfterTextChanged {
|
||||||
longpressCode = it?.toString()
|
longpressCode = it?.toString()?.ifEmpty { "0" }
|
||||||
checkOk()
|
checkOk()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
android:id="@+id/toolbar_key_code"
|
android:id="@+id/toolbar_key_code"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="number"
|
android:inputType="numberSigned"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
Loading…
Add table
Reference in a new issue