textfield & combobox problem in javafx android

三世轮回 提交于 2021-02-05 07:01:08

问题


I am having problem in simple javafx android app. The problem is that i build very simple app with some text-fields and combobox in netbeans ide using gradle javafxmobile-plugin. I run the app in android the textfield and combobox causes problem in android mobile . The problem is that when i typed from keyboard in android nothing changes in text-field until i press space button, or choose suggestion in keyboard upper area. Also when i type some text in text-field and switch another then the text transfor on other textfield which i typed using keyboard rather then orignal text-field. The other problem i notis is that when i select value in combobox nothing changes. some time after tyring again and again changes. Also combobox allow multiple selects...

The working status of app on android devices....

working:

Company Sumsung

Model number QMobile Z10

Android version 5.1


not working:

Company Sumsung

Model number GT-190601

Android version 4.4.4


Company Sumsung

Model number SM-G900F

Android version 6.0.1

This is my gradle file

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.16'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
}

mainClassName = 'com.androidcontrols.Main'

dependencies {

}

jfxmobile {
    javafxportsVersion = '8.60.11'

    android {
        manifest = 'src/android/AndroidManifest.xml'
    }
}

回答1:


If I had to guess, it sounds like the text element used by JavaFxPorts doesn't correctly handle composing text (which probably isn't a concept in JavaFx as it only makes sense on a highly autocomplete driven model like mobile). Words appear when you hit space because then the composing region is committed. If that's the case, the fix would be to fix javafx, or use a keyboard app that doesn't use the composing text paradigm. In particular the fix would be to display the text in the composing region, which it doesn't seem to be doing.

You may have some luck by setting the type of the input field to TYPE_NULL and telling the keyboard app to assume the editor attached to it is stupid/broken. But then you'll be losing features of the keyboard app in doing so.



来源:https://stackoverflow.com/questions/53376368/textfield-combobox-problem-in-javafx-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!