Interface StatusBarService

All Known Implementing Classes:
AndroidStatusBarService, DummyStatusBarService, IOSStatusBarService

public interface StatusBarService
The status bar service provides access to the native status bar of the underlying platform. At the moment, it's only possible to change the color of the status bar.

Example

 StatusBarService.create().ifPresent(service -> {
      service.setColor(Color.GOLD);
  });

Android Configuration: none

iOS Configuration: none

Since:
3.0.0
  • Method Details

    • create

      static Optional<StatusBarService> create()
      Returns an instance of StatusBarService.
      Returns:
      An instance of StatusBarService.
    • setColor

      void setColor(javafx.scene.paint.Color color)
      Sets the color of the status bar to the specified color.
      Parameters:
      color - The color to set the status bar to.
    • setSystemBarsAppearance

      void setSystemBarsAppearance(StatusBarService.APPEARANCE statusBarAppearance, StatusBarService.APPEARANCE navigationBarAppearance)
      Sets the appearance of the icons of the system bars to light or dark, so these have enough contrast and can be easily read Only applies to Android.
      Parameters:
      statusBarAppearance - the light or dark appearance of the status bar
      navigationBarAppearance - the light or dark appearance of the navigation bar