Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
destruk
Level 10

MiniKeyboard Adding a button?

For the miniKeyboard widget it requires focus to work, and it's partially transparent unless you use a custom image - fine.  I can get it to display, I can enter something into the text field, I can delete the text in the field and I can backspace and add spaces into the field, but how do I add a button to select to announce that the user has finished entering what they wanted the texteditbox to contain?
0 Kudos
2 Replies
destruk
Level 10

Re: MiniKeyboard Adding a button?

Alright, so I noticed that key events can be passed up the chain for the minikeyboard, and adding a button widget requires focus to be selectable, so unlike rowlist which tracks the position itself and you have access to it, I think I'd need to track the position for the minikeyboard, and when the highlight box is at the edge then have it switch focus to the buttons, and switch back when needed.  Alternately I can use the options button to accept the input value and use hinttext to display that instruction.
Also to reset the focused button to "A" on subsequent routine openings the item will need to be created as a new item, as we can't set the current focus?
0 Kudos
destruk
Level 10

Re: MiniKeyboard Adding a button?

Yes the minikeyboard needs to be destroyed, and recreated.  It starts to make sense.  Also rendering order is important - draw a rectangle first, then add the buttons, and then add the keyboard last - this way the default focus overlay for the minikeyboard won't be blocked by rectangles drawn on top of it.
0 Kudos