tweaking some strings

This commit is contained in:
tibbi 2022-01-15 22:40:40 +01:00
parent cbeae02b35
commit 061148e945
3 changed files with 8 additions and 24 deletions

View file

@ -108,7 +108,6 @@ class MyKeyboard {
const val EDGE_BOTTOM = 0x08
const val KEYCODE_SHIFT = -1
const val KEYCODE_MODE_CHANGE = -2
const val KEYCODE_CANCEL = -3
const val KEYCODE_DONE = -4
const val KEYCODE_DELETE = -5
const val KEYCODE_ALT = -6

View file

@ -898,13 +898,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
val event = AccessibilityEvent.obtain(eventType)
onInitializeAccessibilityEvent(event)
val text: String = when (code) {
MyKeyboard.KEYCODE_ALT -> context.getString(R.string.keyboardview_keycode_alt)
MyKeyboard.KEYCODE_CANCEL -> context.getString(R.string.keyboardview_keycode_cancel)
MyKeyboard.KEYCODE_DELETE -> context.getString(R.string.keyboardview_keycode_delete)
MyKeyboard.KEYCODE_DONE -> context.getString(R.string.keyboardview_keycode_done)
MyKeyboard.KEYCODE_MODE_CHANGE -> context.getString(R.string.keyboardview_keycode_mode_change)
MyKeyboard.KEYCODE_SHIFT -> context.getString(R.string.keyboardview_keycode_shift)
'\n'.toInt() -> context.getString(R.string.keyboardview_keycode_enter)
MyKeyboard.KEYCODE_DELETE -> context.getString(R.string.keycode_delete)
MyKeyboard.KEYCODE_DONE -> context.getString(R.string.keycode_enter)
MyKeyboard.KEYCODE_MODE_CHANGE -> context.getString(R.string.keycode_mode_change)
MyKeyboard.KEYCODE_SHIFT -> context.getString(R.string.keycode_shift)
else -> code.toChar().toString()
}
event.text.add(text)

View file

@ -3,20 +3,8 @@
<string name="app_launcher_name">Keyboard</string>
<string name="redirection_note">Please enable Simple Keyboard on the next screen, to make it an available keyboard. Press \'Back\' once enabled.</string>
<string name="change_keyboard">Change Keyboard</string>
<!-- KeyboardView - accessibility support -->
<!-- Description of the Alt button in a KeyboardView. [CHAR LIMIT=NONE] -->
<string name="keyboardview_keycode_alt">Alt</string>
<!-- Description of the Cancel button in a KeyboardView. [CHAR LIMIT=NONE] -->
<string name="keyboardview_keycode_cancel">Cancel</string>
<!-- Description of the Delete button in a KeyboardView. [CHAR LIMIT=NONE] -->
<string name="keyboardview_keycode_delete">Delete</string>
<!-- Description of the Done button in a KeyboardView. [CHAR LIMIT=NONE] -->
<string name="keyboardview_keycode_done">Done</string>
<!-- Description of the Mode change button in a KeyboardView. [CHAR LIMIT=NONE] -->
<string name="keyboardview_keycode_mode_change">Mode change</string>
<!-- Description of the Shift button in a KeyboardView. [CHAR LIMIT=NONE] -->
<string name="keyboardview_keycode_shift">Shift</string>
<!-- Description of the Enter button in a KeyboardView. [CHAR LIMIT=NONE] -->
<string name="keyboardview_keycode_enter">Enter</string>
<string name="keycode_delete">Delete</string>
<string name="keycode_mode_change">Change keyboard type</string>
<string name="keycode_shift">Shift</string>
<string name="keycode_enter">Enter</string>
</resources>