Skip to content

Question: Using JavaFX Android-specific skins (TextAreaSkinAndroid / TextFieldSkinAndroid) in custom controls with GluonFX / SubstrateVM #1340

@ctoabidmaqbool

Description

@ctoabidmaqbool

Hi Gluon / JavaFX team 👋

@johanvos @jperedadnr @abhinayagarwal

I know this may not be the perfect repository for this question, but I couldn’t find a more suitable place to ask senior GluonFX / JavaFX experts, so I’m posting here for guidance.

I’m currently working on porting JFoenix to modern JavaFX (17+) with GluonFX, SubstrateVM, and GraalVM, aiming for proper Android support using the latest Gluon toolchain.

🔗 JFoenix (original):
https://github.com/sshahine/JFoenix

🔗 Java 17 port (work in progress):
https://github.com/RationalityFrontline/JFoenix/tree/JFoenix-17.0.0


Background

JFoenix previously worked well on Android using the old JavaFXPorts / javafxmobile-plugin stack (Java 8, Dalvik VM, Charm Down, etc.).

With the move to:

  • JavaFX 17+
  • GluonFX
  • Attach
  • SubstrateVM / GraalVM

I’m trying to restore proper Android behavior for JFoenix controls.


The Problem

While investigating JavaFX Android support, I noticed that JavaFX itself provides Android-specific skins, such as:

  • TextAreaSkinAndroid.java
  • TextFieldSkinAndroid.java

located here:

🔗 https://github.com/openjdk/jfx/tree/jfx17/modules/javafx.controls/src/android/java/javafx/scene/control/skin

However:

  • These classes are not present in the standard JavaFX controls module
  • They only exist under the Android-specific source set
  • They are not directly accessible from normal JavaFX dependencies

JFoenix also has Android-specific skins, for example:

🔗 https://github.com/sshahine/JFoenix/tree/master/jfoenix/src/main/java/com/jfoenix/android/skins

So my questions are:


Questions

  1. How are TextAreaSkinAndroid and TextFieldSkinAndroid meant to be used by third-party libraries?

    • Are they intended only for internal JavaFX use?
    • Is there a supported way to depend on them from external controls?
  2. When building custom JavaFX controls for Android (via GluonFX), what is the recommended approach?

    • Should we rely on standard skins only?
    • Or provide our own Android-specific skins (as JFoenix previously did)?
  3. Is it acceptable (or recommended) to copy or re-implement these Android skins in third-party libraries when targeting Android with SubstrateVM?

  4. Which JDK / JavaFX distribution should be used if one needs Android-specific control behavior?

    • Standard OpenJFX binaries?
    • Gluon’s JavaFX builds only?

Goal

My goal is to make JFoenix work correctly on Android again, using:

  • JavaFX 17+
  • GluonFX
  • SubstrateVM
  • GraalVM

in a way that aligns with current best practices and does not rely on unsupported or fragile internals.

Any guidance, clarification, or recommended direction would be greatly appreciated 🙏

Thank you for your time and for all the great work on JavaFX and Gluon!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions