Is there a way to dynamically change the color of the focused letter of the MiniKeyboard? For example, depending on a user setting, I may want to change the background of the focused letter to be red or green. Is there a way to do this?
I know there is a focusBitmapUri property of the MiniKeyboard, which can set the background color of the focused letter for the life of the app, but I would like to be able to change the color dynamically.
Is there a way to give a blendColor for the background letter color?
thanks, Joe.
I am aware of focusBitmapUri but as I mentioned in my original post, I am looking for a way to dynamically change the color within the code. From what I can see focusBitmapUri can only be used if you know what color you are going to use before you compile the app.[/font]
For example, let’s say I have a color picker within the app that allows the user to select any color. Once a color is selected, then I would want to use that color to change the focused letter background.[/font]
you should be able to update the keyboard’s “focusBitmapUri” on the fly in your brs code.
Your app would need to contain the color images or else find the remote Uri for them.
Then you need a reference to the keyboard from the parent component or scene that contains the onKeyPress where your color is selected. let’s call it keyboardRef. You should be able to create this reference with something like m.keyboardRef = m.top.findNode(“myKeyboardComponentID”)
Once a color is selected, you would just set m.keyboardRef.focusBitmapUri = your desired new color image and it should update on screen immediately.
The problem is there could be an unlimited number of colors selected by the user. Is there a way to dynamically color an image and then assign that image to focusBitmapUri?
Or you could just have a good selection of small colored graphics, such as 100, included in the channel and it picks whichever one is closest (somehow). It would be a bit tricky to program figuring the closest match, but it could be done with decent results.