diff --git a/app/src/main/java/be/scri/services/SimpleKeyboardIME.kt b/app/src/main/java/be/scri/services/SimpleKeyboardIME.kt index 16445da6..2bfd456c 100644 --- a/app/src/main/java/be/scri/services/SimpleKeyboardIME.kt +++ b/app/src/main/java/be/scri/services/SimpleKeyboardIME.kt @@ -114,6 +114,14 @@ abstract class SimpleKeyboardIME( DISPLAY_INFORMATION, } + override fun onCreate() { + super.onCreate() + keyboardBinding = KeyboardViewKeyboardBinding.inflate(layoutInflater) + keyboard = MyKeyboard(this, getKeyboardLayoutXML(), enterKeyType) + onCreateInputView() + setupCommandBarTheme(binding) + } + private fun updateCommandBarHintandPrompt() { val commandBarButton = keyboardBinding.commandBar val hintMessage = HintUtils.getCommandBarHint(currentState, language) @@ -156,8 +164,18 @@ abstract class SimpleKeyboardIME( ScribeState.SELECT_COMMAND -> keyboardView?.setEnterKeyColor(null, isDarkMode = isDarkMode) else -> keyboardView?.setEnterKeyColor(getColor(R.color.dark_scribe_blue)) } + + if (isDarkMode == true) { + val color = ContextCompat.getColorStateList(this, R.color.light_key_color) + binding.scribeKey.foregroundTintList = color + } else { + val colorLight = ContextCompat.getColorStateList(this, R.color.light_key_text_color) + binding.scribeKey.foregroundTintList = colorLight + } } + + override fun onFinishInputView(finishingInput: Boolean) { super.onFinishInputView(finishingInput) currentState = ScribeState.IDLE @@ -179,13 +197,8 @@ abstract class SimpleKeyboardIME( } } - override fun onCreate() { - super.onCreate() - keyboard = MyKeyboard(this, getKeyboardLayoutXML(), enterKeyType) - onCreateInputView() - setupCommandBarTheme(binding) - keyboardBinding = KeyboardViewKeyboardBinding.inflate(layoutInflater) - } + + protected fun switchToCommandToolBar() { val binding = KeyboardViewCommandOptionsBinding.inflate(layoutInflater) @@ -219,6 +232,7 @@ abstract class SimpleKeyboardIME( else -> switchToToolBar() } updateEnterKeyColor(isUserDarkMode) +// updateCloseButtonColor(isUserDarkMode) } private fun switchToToolBar() { @@ -265,6 +279,7 @@ abstract class SimpleKeyboardIME( binding.pluralBtn.setTextColor(Color.WHITE) binding.separator2.setBackgroundColor(getColor(R.color.special_key_dark)) binding.separator3.setBackgroundColor(getColor(R.color.special_key_dark)) + binding.separator4.setBackgroundColor(getColor(R.color.special_key_dark)) } else -> { @@ -276,6 +291,7 @@ abstract class SimpleKeyboardIME( binding.pluralBtn.setTextColor(Color.BLACK) binding.separator2.setBackgroundColor(getColor(R.color.special_key_light)) binding.separator3.setBackgroundColor(getColor(R.color.special_key_light)) + binding.separator4.setBackgroundColor(getColor(R.color.special_key_light)) } } diff --git a/app/src/main/res/drawable/emoji_phone_background_rounded.xml b/app/src/main/res/drawable/emoji_phone_background_rounded.xml index 49bc55e3..d4e1c4b5 100644 --- a/app/src/main/res/drawable/emoji_phone_background_rounded.xml +++ b/app/src/main/res/drawable/emoji_phone_background_rounded.xml @@ -1,11 +1,11 @@ + android:color="@android:color/transparent"> - + diff --git a/app/src/main/res/layout/keyboard_view_command_options.xml b/app/src/main/res/layout/keyboard_view_command_options.xml index 6e4b2a56..9dab8556 100644 --- a/app/src/main/res/layout/keyboard_view_command_options.xml +++ b/app/src/main/res/layout/keyboard_view_command_options.xml @@ -110,6 +110,7 @@ app:layout_constraintStart_toEndOf="@+id/separator_3" app:layout_constraintTop_toTopOf="@+id/command_field" /> +