1 Reply Latest reply on Nov 30, 2011 12:32 AM by GANESHPACHPIND

    Disable Soft KeyBoard

    GANESHPACHPIND

      Hi

       

      i am developing application for android using flash builder 4.5

       

      i want to hide softkeyboard on enter key press on the softkeyboard so i developed following code but its not working

       

      protected function view1_viewActivateHandler(event:ViewNavigatorEvent):void

                  {

                    

                      this.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);

                     

                  }

                 

                  protected function onKeyDown(event:KeyboardEvent):void

                  {

                      if(event.keyCode == Keyboard.ENTER)

                      {       

                      setFocus();

       

                      }

                  }

       

       

      pleses suggest any solution

        • 1. Re: Disable Soft KeyBoard
          GANESHPACHPIND Level 1

          solved:

           

          public function onKeyDown(event:KeyboardEvent):void

                      {

                         

                          if(event.keyCode==Keyboard.BACK)

                          {

                                   event.preventDefault();                  

                              NativeApplication.nativeApplication.exit(0);

                            

                          if(event.keyCode==Keyboard.ENTER)

                          {

                              event.preventDefault();

                              stage.focus=null;

                          }

           

          on enter keyboard will hide

                         

                      }