Reject SoftKeyboard in Flex Mobile

Flex InteractiveObject has a requestSoftKeyboard() method that requestSoftKeyboard() a Soft Keyboard.

How can I do the opposite and send it back?

Thanks.

0
source share
2 answers

With Flex 4.6 you can clean by installing

 stage.focus = null; 

Read more here: open the soft keyboard in the Flex mobile application

+1
source

For example, suppose your InteractiveObject is a TextInput, then you may not use it for the following:

 private function onActivating(event:SoftKeyboardEvent):void { event.preventDefault(); } <s:TextInput softKeyboardActivating="onActivating(event)" /> 

Or you can use

 <s:TextInput needsSoftKeyboard = "False"/> 

EDIT:

You can send it with the following:

Listen to the event when you want to close it (for example, pressing the enter key), and then use the setFocus property to change focus to another component:

 private function CloseKeyboard():void { hidesoftkeyboard.setFocus(); }` <s:TextInput id="txtinput"/> <s:Button id="hidesoftkeyboard" click=CloseKeyboard();> 

UPDATE

Following update 4.6 for Flex, new softkeyboard technologies have been introduced, as described here.

+1
source

Source: https://habr.com/ru/post/903850/


All Articles