Due to a limitation with Android and setting the keyboard type programmatically, I'm thinking of creating a numeric keypad input component in JUCE, for the TextEditor subcomponent of Slider.
I've already made some changed to TextEditor giving it a keyboardType member, so I can check for numeric keyboard type. (I've sent Jules a patch for this)
I'm going to see where I need to override the OS call to showKeyboard.
Just wondering if anyone else has done this already and might have some pointers or code to share.
Note: I am also going to try doing it all in Java as per this post on stackoverflow: http://stackoverflow.com/questions/15099725/need-number-only-soft-keyboard
void TextEditor::setKeyboardType ( VirtualKeyboardType type ) ?
The thing is that it is not documented and I have no idea how to use it. Setting VirtualKeyboardType::numericKeyboard has no impact on what is shown on my dev Android tablet. Probably I just don't understand how to use it.
So - it looks like there’s an attempt at this in the juce android peer classes, but it doesn’t work. I can’t quite see how it expects to, so it’s hard to debug. This is on a virtual device running 8.1.
Does it work for anyone? I stepped in and there’s a message that gets posted on the system queue, and I can’t tell where to pick that up to debug more, but keyboard shows, and it’s always standard keyboard.