Textfield focus issue on javafxports 8.60.7

若如初见. 提交于 2019-12-11 13:03:02

问题


After switching to javafxports version 8.60.7 I encounter some strange bevahiour on TextField. When I tap on a textfield the keyboard shows up, but the textfield doesn't get focused and I am not able to input any character. When I switch the keyboard type (from SwiftKey to Google or vice versa) it works, but only on the selected textfield. I am still not able to focus any other textField.

Furthermore after selecting a textField, the view seems to freeze. I can not navigate back, or show dialogs, though logcat shows the according touchevents and the methods of the view presenter class are called as normal.

Another view that contains a textfield can't be reached from the mainView any longer. When I press the button that triggers the switching to the view, the keyboard shows up above the mainView, and the view freezes again (I included the according logcat output at the end).

On javafxports 8.60.6 everything worked fine.

I'm running javafxports on a Huawei Y-300, with Android 4.1.1

/src/android/resources/java.custom.properties:

monocle.platform=Android
monocle.stackSize=128000

build.gradle:

buildscript {
    repositories {
        jcenter()
         maven {
            url 'http://dl.bintray.com/cjstehno/public'
        }
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.0.7'
        classpath 'gradle-templates:gradle-templates:1.4.1'
        classpath "com.smokejumperit.gradle.license:Gradle-License-Report:0.0.2"
        classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
    }
}

plugins {
  id "org.sonarqube" version "1.1"
}

apply plugin: 'org.javafxports.jfxmobile'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.sonarqube'
apply plugin: 'project-reports'
apply plugin: 'license-report'
apply plugin: 'com.github.ben-manes.versions' 

mainClassName = 'com.energymeter.EnergyMeterApp'

jfxmobile {
 javafxportsVersion = '8.60.7'

android {
    androidSdk = 'F:/AndroidSDK'

    manifest = 'src/android/AndroidManifest.xml'
    applicationPackage = 'com.energymeter'
    }

    ios {
      infoPList = file('src/ios/Default-Info.plist')
    }
}

eclipse {
    classpath {
       downloadSources=true
       downloadJavadoc=true
    }
}

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

ext.GLUON_VERSION = "2.1.0"

dependencies {
    /*************** GLUON **************************/
    compile 'org.javafxports:jfxdvk:8.60.7'
    compile 'com.airhacks:afterburner.mfx:1.6.2'

    compile "com.gluonhq:charm:$GLUON_VERSION"
    androidRuntime "com.gluonhq:charm-android:$GLUON_VERSION"
    iosRuntime "com.gluonhq:charm-ios:$GLUON_VERSION"
    desktopRuntime "com.gluonhq:charm-desktop:$GLUON_VERSION"

    /*************** ORMLITE **************************/
    compile 'com.j256.ormlite:ormlite-core:4.48'
    androidCompile 'com.j256.ormlite:ormlite-android:4.48'
    desktopCompile 'com.j256.ormlite:ormlite-jdbc:4.48'
    desktopCompile "org.xerial:sqlite-jdbc:3.8.11.2"
    desktopCompile 'org.xerial.thirdparty:nestedvm:1.0'

    /*************** DIVERS  **************************/
    compile files('lib/jfoenix-0.0.0-SNAPSHOT-retrolambda.jar')

    compile 'de.jensd:fontawesomefx:8.8' /*8.9 verwendet invokeDynamic*/
    compile 'org.joda:joda-money:0.11'
    compile 'net.sf.supercsv:super-csv:2.4.0'
    compile 'org.slf4j:slf4j-api:1.7.16'
    desktopRuntime 'ch.qos.logback:logback-classic:1.1.5'
    androidRuntime('com.github.tony19:logback-android-classic:1.1.1-4'){
        exclude group: 'com.google.android', module: 'android'}
    androidRuntime 'com.github.tony19:logback-android-core:1.1.1-4'

    /*************** TEST *****************************/
    testCompile 'junit:junit:4.12'
}

logcat output:

    04-01 18:14:45.790: E/FXEntity(16186): call native MultitouchEvent, density = 1.5, touchXs0 = 436
04-01 18:14:45.790: I/GLASS(16186): Call InternalSurfaceView_onMultiTouchEventNative
04-01 18:14:45.790: I/GLASS(16186): Glass will pass multitouchevent to monocle with count = 1
04-01 18:14:45.840: E/FXEntity(16186): call native MultitouchEvent, density = 1.5, touchXs0 = 436
04-01 18:14:45.860: I/GLASS(16186): Call InternalSurfaceView_onMultiTouchEventNative
04-01 18:14:45.860: I/GLASS(16186): Glass will pass multitouchevent to monocle with count = 1
04-01 18:14:45.870: I/System.out(16186): don't add points, primary = -1
04-01 18:14:46.020: E/dalvikvm(16186): GC_FOR_ALLOC freed 4580K, 26% free 15699K/21127K, paused 20ms+5ms, total 113ms
04-01 18:14:46.210: E/dalvikvm(16186): GC_CONCURRENT freed 3K, 7% free 19665K/21127K, paused 14ms+15ms, total 194ms
04-01 18:14:46.870: I/System.out(16186): PPSRenderer: scenario.effect - createShader: LinearConvolve_12
04-01 18:14:46.940: V/FXEntity(16186): surfacetextureupdated...
04-01 18:14:47.040: V/FXEntity(16186): surfacetextureupdated...
04-01 18:14:47.110: V/FXEntity(16186): surfacetextureupdated...
04-01 18:14:48.770: E/FXEntity(16186): call native MultitouchEvent, density = 1.5, touchXs0 = 270
04-01 18:14:48.770: I/GLASS(16186): Call InternalSurfaceView_onMultiTouchEventNative
04-01 18:14:48.770: I/GLASS(16186): Glass will pass multitouchevent to monocle with count = 1
04-01 18:14:48.820: E/FXEntity(16186): call native MultitouchEvent, density = 1.5, touchXs0 = 270
04-01 18:14:48.840: I/GLASS(16186): Call InternalSurfaceView_onMultiTouchEventNative
04-01 18:14:48.840: I/GLASS(16186): Glass will pass multitouchevent to monocle with count = 1
04-01 18:14:48.840: I/System.out(16186): don't add points, primary = -1
04-01 18:14:48.870: V/FXEntity(16186): surfacetextureupdated...
04-01 18:14:49.510: E/dalvikvm(16186): GC_CONCURRENT freed 5927K, 30% free 15939K/22663K, paused 15ms+22ms, total 286ms
04-01 18:14:49.990: E/dalvikvm(16186): GC_CONCURRENT freed 659K, 29% free 16213K/22663K, paused 14ms+19ms, total 206ms
04-01 18:14:50.460: E/dalvikvm(16186): GC_CONCURRENT freed 584K, 27% free 16561K/22663K, paused 14ms+9ms, total 219ms
04-01 18:14:50.820: V/FXEntity(16186): Called notify_showIME
04-01 18:14:50.820: V/FXEntity(16186): Done calling notify_showIME
04-01 18:14:51.060: W/dalvikvm(16186): VFY: unable to resolve static method 38363: Ljava/lang/Math;.floorMod (II)I
04-01 18:14:51.080: E/dalvikvm(16186): GC_CONCURRENT freed 703K, 26% free 16827K/22663K, paused 15ms+19ms, total 357ms
04-01 18:14:51.250: I/System.out(16186): meterskin layout children
04-01 18:14:51.470: I/System.out(16186): ES2ResourceFactory: Prism - createStockShader: FillRoundRect_Color.frag
04-01 18:14:51.510: I/System.out(16186): Loading Prism common native library ...
04-01 18:14:51.510: I/System.out(16186):    succeeded.
04-01 18:14:51.640: I/System.out(16186): PPSRenderer: scenario.effect - createShader: LinearConvolveShadow_32
04-01 18:14:51.670: E/dalvikvm(16186): GC_CONCURRENT freed 531K, 20% free 18185K/22663K, paused 14ms+10ms, total 151ms
04-01 18:14:51.710: I/System.out(16186): PPSRenderer: scenario.effect - createShader: PhongLighting_DISTANT
04-01 18:14:51.740: I/System.out(16186): PPSRenderer: scenario.effect - createShader: ColorAdjust
04-01 18:14:51.820: I/System.out(16186): ES2ResourceFactory: Prism - createStockShader: AlphaTexture_LinearGradient.frag
04-01 18:15:01.700: E/dalvikvm(16186): GC_CONCURRENT freed 1076K, 19% free 18448K/22663K, paused 23ms+6ms, total 163ms
04-01 18:15:22.260: E/dalvikvm(16186): GC_CONCURRENT freed 1462K, 19% free 18445K/22663K, paused 24ms+6ms, total 156ms
04-01 18:15:42.930: E/dalvikvm(16186): GC_CONCURRENT freed 1465K, 19% free 18445K/22663K, paused 23ms+6ms, total 174ms

来源:https://stackoverflow.com/questions/36361644/textfield-focus-issue-on-javafxports-8-60-7

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