- 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
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<StatusBarService>create()Returns an instance ofStatusBarService.voidsetColor(javafx.scene.paint.Color color) Sets the color of the status bar to the specified color.voidsetSystemBarsAppearance(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.
-
Method Details
-
create
Returns an instance ofStatusBarService.- 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 barnavigationBarAppearance- the light or dark appearance of the navigation bar
-