B4J Question how to show a virtual keyboard in the abmpage

jinyistudio

Well-Known Member
Licensed User
Longtime User
Can i put a put a <hideinput> into abmpage ?
virtual keyboard https://mottie.github.io/Keyboard/

B4X:
<div id="hideinput" style="display:none">
  <input id="virtualkb" type="text">
</div>

$('#virtualkb')
    .keyboard({
        layout: 'customLayout',                            
        usePreview: true,
        maxLength:10,
        accepted : function(event, keyboard, el) {
            console.log('The content "' + el.value + '" was accepted!');
            jp_setValue(vkfield, el.value);
        }
    }).addTyping();

cann't popup virtual keyboard when i click a 'rect972' element in a svg file. browser always give following message
VM301:54 Uncaught TypeError: Cannot read properties of undefined (reading 'reveal')
at eval (eval at b4j_eval (b4j_ws_jp.js:60:13), <anonymous>:54:34)
at archer.min.js:15:11932
at Array.forEach (<anonymous>)
at u (archer.min.js:15:11910)
at Object.a [as emit] (archer.min.js:15:11657)
at SVGRectElement.h (archer.min.js:16:6557)

B4X:
graphic.element('rect972').on('click', function(element, event) {
       console.log('event: ' + event.type + ', element: ' + element.id);
    $('#virtualkb').data('keyboard').reveal();
    vkfield = 'volt';
});
 
Last edited:
Solution
I build a abmcutomcomponent. It is OK!
B4X:
Sub ABMComp_Build(InternalPage As ABMPage, internalID As String) As String
    Return $"<div id="${internalID}" style="display:none"><input id="virtualkb" type="text" ></div><script>var _${internalID};</script>"$
End Sub

jinyistudio

Well-Known Member
Licensed User
Longtime User
I build a abmcutomcomponent. It is OK!
B4X:
Sub ABMComp_Build(InternalPage As ABMPage, internalID As String) As String
    Return $"<div id="${internalID}" style="display:none"><input id="virtualkb" type="text" ></div><script>var _${internalID};</script>"$
End Sub
 
Last edited:
Upvote 0
Solution
Top