文字栏位JavaFX And​​roid中的组合框问题 [英] textfield & combobox problem in javafx android

查看:67
本文介绍了文字栏位JavaFX And​​roid中的组合框问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在简单的javafx android应用程序中遇到问题. 问题是我使用gradle javafxmobile-plugin在netbeans ide中构建了一些文本字段和combobox的非常简单的应用程序. 我在android中运行该应用程序时,textfield和combobox导致了android mobile中的问题. 问题是,当我在android中从键盘键入内容时,在文本字段中没有任何更改,直到按空格键或在键盘上方区域选择建议为止. 另外,当我在文本字段中键入一些文本并切换另一个文本时,则在其他文本字段上使用文本转换,而我是使用键盘而不是原始文本字段键入的. 我不是的另一个问题是,当我在组合框中选择值时,没有任何变化.轮胎打磨一段时间后,一次又一次变化.组合框还允许多个选择...

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...

公司 三星

型号 QMobile Z10

Model number QMobile Z10

Android版本 5.1

Android version 5.1

公司 三星

型号 GT-190601

Model number GT-190601

Android版本 4.4.4

Android version 4.4.4

公司 三星

型号 SM-G900F

Model number SM-G900F

Android版本 6.0.1

Android version 6.0.1

这是我的gradle文件

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'
    }
}

推荐答案

如果我不得不猜测,这听起来像JavaFxPorts使用的text元素不能正确处理组成文本(这可能不是JavaFx中的概念,因为只有在高度自动完成的驱动模型(如移动设备)上才有意义.当您按下空格时会出现单词,因为这会导致组成区域被提交.如果是这种情况,解决方法将是修复javafx,或使用不使用撰写文本范例的键盘应用程序.具体来说,解决方法是将文本显示在撰写区域中,而这似乎并没有.

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.

通过将输入字段的类型设置为TYPE_NULL并告诉键盘应用程序假定附加到该输入框的编辑器是愚蠢/损坏,您可能会有些运气.但是那样做的话,您将失去键盘应用程序的功能.

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.

这篇关于文字栏位JavaFX And​​roid中的组合框问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆