03-04-2011 05:43 PM
@moseslecce
I too wanted a numeric keyboard, but couldn't really get a good one with the virtual keyboard. So I just created some room on my app, and implelmented my own keypad....with keys 0-9 and the "." (decimal), clear and "-" (negative) buttons.
It was a good challenge I would say. And to be honest looks a bit more professional, since I was able to customize my own borders, layout, color scheme etc.
If you can, I would suggest you just make your own. If you need help let me know...preferably start a new thread, since this one is about "hid virtual keyboard" only ![]()
G
03-26-2011 05:44 AM - edited 03-26-2011 05:52 AM
@gpatton
i also created my own keyboard type input like you on the app screen itself (i like it better than the pop up keyboard anyways).
was just wondering how you made it so when you click in the TextInput field the default popup keyboard doesn't show up?
Thanks
11-30-2011 02:51 PM
Regards to all,
in terms of the virtual keyboard, to hide is is enough to write:
getVirtualKeyboard().setVisibility(VirtualKeyboard.HIDE);
and to show it again,
getVirtualKeyboard().setVisibility(VirtualKeyboard.SHOW);
In Re: to the question about Numeric virtual keyboard, there is a number of articles out there, but to give you a quick, no -explanation answer here is the line of the code that does it for you:
AutoTextEditField MyNumericField = new AutoTextEditField("Numeric Field: ", "", 7, AutoTextEditField.FILTER_INTEGER);
// your key component here is AutoTextEditField.FILTER_INTEGER, of course :-)
Happy codeing to all!
Regards,
Hrvoje
02-27-2012 12:13 PM
Hi all,
The getVirtualKeyboard() method does not seem to be available in the 2.0 SDK. Or am I missing something?
Is there another way of showing/hiding the virtual keyboard programatically?
Thanks in advance!
02-27-2012 02:32 PM
I used to be able to do it prior to os 2 using
this.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, change); ... protected function change(event:StageOrientationEvent):void { if(navigator.stage.orientation == "portrait"){ trace("portrait"); mainTextField.needsSoftKeyboard = false; IMFConnection.imfConnection.hideInput(); // hide keyboard }else{ IMFConnection.imfConnection.showInput(); } }
02-28-2012 01:33 AM
Yeah, it looks like the way to do it in v1 SDK doesnt work in v2. Here is what I ended up doing to programatically hide the virtual keyboard for v2 SDK:
this.stage.focus = null;
02-28-2012 10:24 AM
dcfusion: have you gotten this to work with StageOrientationEvent.ORIENTATION_CHANGE? I'm trying to do my keyboard visibility stuff inside that event handler but i can't even get a trace to work.