Open Linfye opened 1 day ago
The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Android rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!
The creation process of the keyboard is implemented by a helper, and I haven't found a suitable way to pass the isCommandMode
parameter. After modifying the isCommandMode
value in SimpleKeyboardIME and recreating the keyboard, it seems that the parameter is reset, and I don't know how to solve this. Could you help me with this? Thanks! :) @andrewtavis
CC also @angrezichatterbox as I'm at work atm :) I'll take a look tonight or over the weekend, @Linfye! Thank you!
I am not sure we have any easy ways of passing the command boolean. However, I have another way in which we could do it. One method is to set a custom state within the keyboard. So for eg if we use the EditorInfo.IME_ACTION_UNSPECIFIED is the condition for setting the icon of the enter key to the Play Icon. Now there is the setEnterKeyColor function use it to set the mEnterKeyType as that specific type. Now create a function to set the enter key icon using this logic in MyKeyboard.kt and call this function after setting the mEnterKey type. You can use any custom type to do it.
I am happy to explain in more detail :)
I am not sure we have any easy ways of passing the command boolean. However, I have another way in which we could do it. One method is to set a custom state within the keyboard. So for eg if we use the EditorInfo.IME_ACTION_UNSPECIFIED is the condition for setting the icon of the enter key to the Play Icon. Now there is the setEnterKeyColor function use it to set the mEnterKeyType as that specific type. Now create a function to set the enter key icon using this logic in MyKeyboard.kt and call this function after setting the mEnterKey type. You can use any custom type to do it.
I had considered this method initially, but I thought that modifying the built-in state might not be a common practice in Android development (I'm not quite sure about this). Since you suggested it, I can give it a try. Thank you! :)
I am not sure we have any easy ways of passing the command boolean. However, I have another way in which we could do it. One method is to set a custom state within the keyboard. So for eg if we use the EditorInfo.IME_ACTION_UNSPECIFIED is the condition for setting the icon of the enter key to the Play Icon. Now there is the setEnterKeyColor function use it to set the mEnterKeyType as that specific type. Now create a function to set the enter key icon using this logic in MyKeyboard.kt and call this function after setting the mEnterKey type. You can use any custom type to do it.
I had considered this method initially, but I thought that modifying the built-in state might not be a common practice in Android development (I'm not quite sure about this). Since you suggested it, I can give it a try. Thank you! :)
You could also set a companion object as a new type and set the key type as that from the setEnterKeyColor function.
Contributor checklist
./gradlew lintKotlin detekt test
command as directed in the testing section of the contributing guideDescription
This PR changes enter icon to play button when in a command mode.
Related issue
160