Skip to main content
Inspiring
July 11, 2013
Question

[Nexus 4] Setting focus and showing soft keyboard

  • July 11, 2013
  • 1 reply
  • 463 views

Within my app I have code like this:

// in Item class constructor

inputText.needsSoftKeyboard = true;

// in ItemContainer class

var item:Item = new Item();

addChild(item);

stage.focus = item.inputText;

requestSoftKeyboard();

However, when I test on my Nexus 4 I find that while the textfield appears to receive focus (there's a blinking text cursor in it) the soft keyboard does not show up. If I manually tap the textfield then the soft keyboard appears.

So, how do I get the soft keyboard to show up when I create the item?

-Aaron

This topic has been closed for replies.

1 reply

Inspiring
July 12, 2013

I got it to work by calling:

item.inputText.requestSoftKeyboard()

-A