Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 21
Registered: ‎10-17-2009
My Device: Not Specified

Why doesn't the virtual keyboard show up?

Hello,

 

I can't get the virtual keyboard, or soft keyboard, to show up when clicking in a text input field, as shown in the code below. On the emulator, nothing shows up. Why? I'm tried a dozen way so far to get the keyboard to come up on the Z10, but nothing works. Am I missing something stupid or is it a bug? 

 

There are a few questions along the same line on the forum that are unanswered, so a resolution to this problem would be helpful to a few developer, at least.

 

Here is the code, a single class in a test project. The project was linked to qnxui.swf and the QNXSkins.ane, packaged and it runs fine on the emulator. Only the keyboard won't appear when you tap in the text input field.

 

package

{

   import flash.display.Sprite;

   import flash.display.StageAlign;

   import flash.display.StageScaleMode;

   import flash.text.TextField;

   import flash.text.engine.TextLine;

   

   import qnx.fuse.ui.core.Container;

   import qnx.fuse.ui.text.ReturnKeyType;

   import qnx.fuse.ui.text.TextInput;

   import qnx.fuse.ui.text.TextInputIconMode;

   

   public class Main extends Sprite

   {

      public function Main()

      {

         super();

  

         var highscoreTextField:TextInput = new TextInput();

         highscoreTextField.setPosition(100,200);

         highscoreTextField.width = 400;

         highscoreTextField.softKeyboardType = qnx.fuse.ui.text.KeyboardType.DEFAULT;

         highscoreTextField.returnKeyLabel = ReturnKeyType.GO;

         highscoreTextField.clearIconMode = TextInputIconMode.UNLESS_EDITING;

         addChild(highscoreTextField);

 

      }

   }

}

 

Thanks for any and all help. I've spent entirely too much time on this problem.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Why doesn't the virtual keyboard show up?

On the simulator, the keyboard wont come up, because you have a keyboard attached to the computer to type in text. Try commenting out softKeyboardType to see if that makes a difference on the actual device.

I'm not seeing you having the stage size, scale and orientation defined. May not make a difference, but good to have in examples like this.