Forums

OverviewV-Play 1 Support › Bug in TextInputVPlay (on Android)?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5218

    Christian
    V-Play Team

    Hi,

    I’ve been experiencing weird behavior with TextInputVPlay:

    I placed a TextInputVPlay item inside a Rectangle with a MouseArea, when the MouseArea is clicked, the method openSoftwareInputPanel() is called (to have a wider area for the user to click to open the input).

    I have tested it on Android devices, and everything is working fine, the software keyboard opens when the text box is pressed and when the user presses the enter button on the software keyboard, it closes again. When the user presses on the MouseArea again, the input opens again.

    But when the user presses the “back” button on the Android device instead of the enter button on the software keyboard, the keyboard also closes, but then it can’t be opened again by clicking on either the text or my MouseArea.

    Here’s my code:

     

                    Rectangle {
                        color: "white"
                        anchors.fill: parent
                        anchors.leftMargin: 100
    
                        TextInputVPlay {
                            id: textInput
                            anchors.horizontalCenter: parent.horizontalCenter
                            font.pixelSize: 20
                            anchors.centerIn: parent
                            color: "black"
                            text: newGameName
                        }
    
                        MouseArea {
                            anchors.fill: parent
    
                            onClicked: {
                                textInput.openSoftwareInputPanel()
                            }
                        }
                    }

    I have tested this on three different Android devices and the behavior is always the same (Android 2.3.3 and 4.1). Unfortunately i can’t test on iOS right now but those devices don’t have a built-in back button so this shouldn’t be a problem.

    Might this be a bug in the TextInputVPlay class?

    Cheers, Chrisu

    #5220

    David

    Hi Chrisu,

    thank you for the demonstration and for pointing out the problem. We will investigate the behavior. For the moment until we fixed it you can use a textInput.closeSoftwareInputPanel() before you call the textInput.openSoftwareInputPanel(). Another hint: it would be better to use the TextInputItem instead the TextInputVPlay when you use a own MouseArea, so the internal functions won’t interference.

    Cheers,

    David

    #5226

    David

    Hi again,

    the problem is solved and will be available with the next daily build!

    Cheers,

    David

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support