Search code examples
javajavafxgluon-mobile

Missing toggle button in settings pane


Using the following

        <maven-compiler-plugin-version>3.10.1</maven-compiler-plugin-version>
        <javafx-maven-plugin-version>0.0.8</javafx-maven-plugin-version>
        <gluonfx-maven-plugin-version>1.0.15</gluonfx-maven-plugin-version>

        <java-version>17</java-version>
        <javafx-version>19</javafx-version> (also specifying javafxStaticSdkVersion as 19)
        <charm-version>6.2.0</charm-version>
        <attach-version>4.0.15</attach-version>

and graalvm-svm-java17-linux-gluon-22.1.0.1-Final, with this simple View class as the home view:

public class OptionsView extends View {

    public OptionsView() {
        var settingsPane = createSettingsPane();
        setCenter(settingsPane);
    }

    private SettingsPane createSettingsPane() {
        var recording = new SimpleBooleanProperty();
        var recordingOption = new DefaultOption<>("Record", "Turn recording on/off", "Connection", recording, true);

        var settingsPane = new SettingsPane();
        settingsPane.getOptions().add(recordingOption);
        settingsPane.setSearchBoxVisible(false);
        return settingsPane;
    }
}

The toggle button does not show on Android:

enter image description here

On desktop it does:

enter image description here

Is this a bug or am I doing something wrong?

Edit: I noticed that with <charm-version>6.1.0</charm-version> it works fine, so looks like a bug in 6.2.0.


Solution

  • From the comment by @José Pereda:

    6.2.0 contained a refactor of the skin package (that moved out from impl), but there was a small bug in the reflection list from those skin classes which caused exactly your issue, that has been fixed with 6.2.1. And 6.2.2 was just recently released.

    Updating to 6.2.2 fixes the issue.