Package com.iizix.gyro
Class StatusBarConfig
- java.lang.Object
- com.iizix.gyro.StatusBarConfig
public class StatusBarConfig extends java.lang.ObjectThe status bar configuration class. To configure, call the methods in the class.- Author:
- Christopher Mindus
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStatusBarConfig.StyleEnumeration for style.
Constructor Summary
Constructors Constructor Description StatusBarConfig()Constructs the status bar configuration instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBackgroundColor()Gets the RGB background color.intgetOverlaysWebView()Gets the overlays web view.StatusBarConfig.StylegetStyle()Gets the style.intgetVisibility()Gets the status bar visibility configured.voidhide()Hides the status bar.voidsetBackgroundColor(int rgb)Sets the RGB background color.voidsetOverlaysWebView(boolean doOverlay)Sets if the status bar should overlay the web view or not.voidsetStyle(StatusBarConfig.Style style)Sets the style.voidshow()Shows the status bar.
Method Detail
show
public void show()
Shows the status bar.
hide
public void hide()
Hides the status bar.
getVisibility
public int getVisibility()
Gets the status bar visibility configured.- Returns:
- 1 for show, 0 for hide and -1 if not set.
setBackgroundColor
public void setBackgroundColor(int rgb)
Sets the RGB background color.Note: on iOS 7, when you set setOverlaysWebView to false, you can set the background color of the statusbar by color name.
- Parameters:
rgb- The RGB color in range between 0 and 0xFFF_FFF.- Throws:
java.lang.IllegalArgumentException- If the value is out of range.
getBackgroundColor
public int getBackgroundColor()
Gets the RGB background color.- Returns:
- The background color set, -1 if not set.
setStyle
public void setStyle(StatusBarConfig.Style style)
Sets the style.Note: the style is only supported for iOS and Windows Phone.
- Parameters:
style- The style, or null to unconfigure it.
getStyle
public StatusBarConfig.Style getStyle()
Gets the style.Note: the style is only supported for iOS and Windows Phone.
- Returns:
- The style, or null if not configured.
setOverlaysWebView
public void setOverlaysWebView(boolean doOverlay)
Sets if the status bar should overlay the web view or not.- Parameters:
doOverlay- Set to true to overlay, false to let the status bar reside above the web view.
getOverlaysWebView
public int getOverlaysWebView()
Gets the overlays web view.- Returns:
- 1=overlay, 0=above, -1=not configured.