StylingOptions

public class StylingOptions extends Object
implements Parcelable

Defines visual styling options for the navigation UI in a NavigationView or SupportNavigationFragment, such as theme colors, maneuver icon colors, and header typography.

All styling properties default to null, which instructs the SDK to apply its built-in default styling for any unspecified option.

Inherited Constant Summary

Public Constructor Summary

StylingOptions()
Creates a new instance of StylingOptions with default values.
StylingOptions(StylingOptions stylingOptions)
Creates a new instance of StylingOptions by copying the values from another instance.

Public Method Summary

int
boolean
equals(Object obj)
Tests if this StylingOptions is equal to another.
String
getHeaderDistanceTypefacePath()
This method is deprecated. This method is deprecated and will be removed in a future release.
Integer
getHeaderDistanceUnitsTextColor()
Returns the color of the distance units text in the navigation header view.
Float
getHeaderDistanceUnitsTextSize()
This method is deprecated. This method is deprecated and will be removed in a future release.
Integer
getHeaderDistanceValueTextColor()
Returns the color of the distance value text in the navigation header view.
Float
getHeaderDistanceValueTextSize()
This method is deprecated. This method is deprecated and will be removed in a future release.
Integer
getHeaderGuidanceRecommendedLaneColor()
Returns the color of the recommended lanes in the lane guidance view of the navigation header.
Float
getHeaderInstructionsFirstRowTextSize()
This method is deprecated. This method is deprecated and will be removed in a future release.
Float
getHeaderInstructionsSecondRowTextSize()
This method is deprecated. This method is deprecated and will be removed in a future release.
Integer
getHeaderInstructionsTextColor()
Returns the color of the instructions text in the navigation header view.
String
getHeaderInstructionsTypefacePath()
This method is deprecated. This method is deprecated and will be removed in a future release.
Integer
getHeaderLargeManeuverIconColor()
Returns the color of the maneuver icon in the primary navigation header view.
Integer
getHeaderNextStepTextColor()
Returns the color of the text in the next step view of the navigation header.
Float
getHeaderNextStepTextSize()
This method is deprecated. This method is deprecated and will be removed in a future release.
String
getHeaderNextStepTypefacePath()
This method is deprecated. This method is deprecated and will be removed in a future release.
Integer
getHeaderSmallManeuverIconColor()
Returns the color of the maneuver icon in the next step view of the navigation header.
Integer
getPrimaryDayModeThemeColor()
Returns the primary day-mode color for the UI theme.
Integer
getPrimaryNightModeThemeColor()
Returns the primary night-mode color for the UI theme.
Integer
getSecondaryDayModeThemeColor()
Returns the secondary day-mode color for the UI theme.
Integer
getSecondaryNightModeThemeColor()
Returns the secondary night-mode color for the UI theme.
int
hashCode()
Returns a hash code value for the object.
StylingOptions
headerDistanceTypefacePath(String path)
This method is deprecated. This method is deprecated and will be removed in a future release.
StylingOptions
headerDistanceUnitsTextColor(Integer color)
Sets the color of the distance units text in the navigation header view.
StylingOptions
headerDistanceUnitsTextSize(Float size)
This method is deprecated. This method is deprecated and will be removed in a future release.
StylingOptions
headerDistanceValueTextColor(Integer color)
Sets the color of the distance value text in the navigation header view.
StylingOptions
headerDistanceValueTextSize(Float size)
This method is deprecated. This method is deprecated and will be removed in a future release.
StylingOptions
headerGuidanceRecommendedLaneColor(Integer color)
Sets the color of the recommended lanes in the lane guidance view.
StylingOptions
headerInstructionsFirstRowTextSize(Float size)
This method is deprecated. This method is deprecated and will be removed in a future release.
StylingOptions
headerInstructionsSecondRowTextSize(Float size)
This method is deprecated. This method is deprecated and will be removed in a future release.
StylingOptions
headerInstructionsTextColor(Integer color)
Sets the color of the instructions text in the navigation header view.
StylingOptions
headerInstructionsTypefacePath(String path)
This method is deprecated. This method is deprecated and will be removed in a future release.
StylingOptions
headerLargeManeuverIconColor(Integer color)
Sets the color of the maneuver icon in the primary navigation header view.
StylingOptions
headerNextStepTextColor(Integer color)
Sets the color of the text in the next step view of the navigation header.
StylingOptions
headerNextStepTextSize(Float size)
This method is deprecated. This method is deprecated and will be removed in a future release.
StylingOptions
headerNextStepTypefacePath(String path)
This method is deprecated. This method is deprecated and will be removed in a future release.
StylingOptions
headerSmallManeuverIconColor(Integer color)
Sets the color of the maneuver icon in the next step view of the navigation header.
StylingOptions
primaryDayModeThemeColor(Integer color)
Sets the primary day-mode color for the UI theme.
StylingOptions
primaryNightModeThemeColor(Integer color)
Sets the primary night-mode color for the UI theme.
StylingOptions
secondaryDayModeThemeColor(Integer color)
Sets the secondary day-mode color for the UI theme.
StylingOptions
secondaryNightModeThemeColor(Integer color)
Sets the secondary night-mode color for the UI theme.

Inherited Method Summary

Public Constructors

public StylingOptions ()

Creates a new instance of StylingOptions with default values.

public StylingOptions (StylingOptions stylingOptions)

Creates a new instance of StylingOptions by copying the values from another instance.

Parameters
stylingOptions the instance to copy values from

Public Methods

public int describeContents ()

public boolean equals (Object obj)

Tests if this StylingOptions is equal to another.

Parameters
obj the other object to compare with
Returns
  • true if the objects are equal, false otherwise

public String getHeaderDistanceTypefacePath ()

This method is deprecated.
This method is deprecated and will be removed in a future release.

Returns the file path of the typeface for the distance text in the navigation header view.

Returns
  • the path if set, or null if no path is set

public Integer getHeaderDistanceUnitsTextColor ()

Returns the color of the distance units text in the navigation header view.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public Float getHeaderDistanceUnitsTextSize ()

This method is deprecated.
This method is deprecated and will be removed in a future release.

Returns the size of the distance units text in the navigation header view.

Returns
  • the size in scale independent pixels or null if no size is set

public Integer getHeaderDistanceValueTextColor ()

Returns the color of the distance value text in the navigation header view.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public Float getHeaderDistanceValueTextSize ()

This method is deprecated.
This method is deprecated and will be removed in a future release.

Returns the size of the distance value text in the navigation header view.

Returns
  • the size in scale independent pixels (sp) or null if no size is set

public Integer getHeaderGuidanceRecommendedLaneColor ()

Returns the color of the recommended lanes in the lane guidance view of the navigation header.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public Float getHeaderInstructionsFirstRowTextSize ()

This method is deprecated.
This method is deprecated and will be removed in a future release.

Returns the size of the first row of the instructions text in the navigation header view.

Returns
  • the size in scale independent pixels (sp) or null if no size is set

public Float getHeaderInstructionsSecondRowTextSize ()

This method is deprecated.
This method is deprecated and will be removed in a future release.

Returns the size of the second row of the instructions text in the navigation header view.

Returns
  • the size in scale independent pixels (sp) or null if no size is set

public Integer getHeaderInstructionsTextColor ()

Returns the color of the instructions text in the navigation header view.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public String getHeaderInstructionsTypefacePath ()

This method is deprecated.
This method is deprecated and will be removed in a future release.

Returns the file path of the typeface for the instructions text in the navigation header view.

Returns
  • the typeface if set, or null if no typeface is set

public Integer getHeaderLargeManeuverIconColor ()

Returns the color of the maneuver icon in the primary navigation header view.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public Integer getHeaderNextStepTextColor ()

Returns the color of the text in the next step view of the navigation header.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public Float getHeaderNextStepTextSize ()

This method is deprecated.
This method is deprecated and will be removed in a future release.

Returns the size of the next step text in the navigation header view.

Returns
  • the size in scale independent pixels (sp) or null if no size is set

public String getHeaderNextStepTypefacePath ()

This method is deprecated.
This method is deprecated and will be removed in a future release.

Returns the file path of the typeface for the next step text in the navigation header view.

Returns
  • the path if set, or null if no path is set

public Integer getHeaderSmallManeuverIconColor ()

Returns the color of the maneuver icon in the next step view of the navigation header.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public Integer getPrimaryDayModeThemeColor ()

Returns the primary day-mode color for the UI theme.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public Integer getPrimaryNightModeThemeColor ()

Returns the primary night-mode color for the UI theme.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public Integer getSecondaryDayModeThemeColor ()

Returns the secondary day-mode color for the UI theme.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public Integer getSecondaryNightModeThemeColor ()

Returns the secondary night-mode color for the UI theme.

Returns
  • an Integer representing the ARGB color, or null if no color is set

public int hashCode ()

Returns a hash code value for the object.

Returns
  • a hash code value for this object

public StylingOptions headerDistanceTypefacePath (String path)

This method is deprecated.
This method is deprecated and will be removed in a future release.

Sets the file path of the typeface for the distance text in the navigation header view. If path is null, the typeface defaults to sans serif regular.

Parameters
path
Returns
  • the object for which the method was called, with the new path set

public StylingOptions headerDistanceUnitsTextColor (Integer color)

Sets the color of the distance units text in the navigation header view. If color is null, the color defaults to white.

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set

public StylingOptions headerDistanceUnitsTextSize (Float size)

This method is deprecated.
This method is deprecated and will be removed in a future release.

Sets the size of the distance units text in the navigation header view. If size is null, the size defaults to 14.

Parameters
size the text size in scale independent pixels (sp)
Returns
  • the object for which the method was called, with the new text size set

public StylingOptions headerDistanceValueTextColor (Integer color)

Sets the color of the distance value text in the navigation header view. If color is null, the color defaults to white.

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set

public StylingOptions headerDistanceValueTextSize (Float size)

This method is deprecated.
This method is deprecated and will be removed in a future release.

Sets the size of the distance value text in the navigation header view. If size is null, the size defaults to 28.

Parameters
size the text size in scale independent pixels (sp)
Returns
  • the object for which the method was called, with the new text size set

public StylingOptions headerGuidanceRecommendedLaneColor (Integer color)

Sets the color of the recommended lanes in the lane guidance view. If color is null, the color defaults to white.

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set

public StylingOptions headerInstructionsFirstRowTextSize (Float size)

This method is deprecated.
This method is deprecated and will be removed in a future release.

Sets the size of the text in the first row of the instructions in the navigation header view. If size is null, the size defaults to 30.

Parameters
size the text size in scale independent pixels (sp)
Returns
  • the object for which the method was called, with the new text size set

public StylingOptions headerInstructionsSecondRowTextSize (Float size)

This method is deprecated.
This method is deprecated and will be removed in a future release.

Sets the size of the text in the second row of the instructions in the navigation header view. If size is null, the size defaults to 30.

Parameters
size the text size in scale independent pixels (sp)
Returns
  • the object for which the method was called, with the new text size set

public StylingOptions headerInstructionsTextColor (Integer color)

Sets the color of the instructions text in the navigation header view. If color is null, the color defaults to white.

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set

public StylingOptions headerInstructionsTypefacePath (String path)

This method is deprecated.
This method is deprecated and will be removed in a future release.

Sets the file path of the typeface for the instructions text in the navigation header view. If path is null, the typeface defaults to sans serif regular.

Parameters
path
Returns
  • the object for which the method was called, with the new path set

public StylingOptions headerLargeManeuverIconColor (Integer color)

Sets the color of the maneuver icon in the primary navigation header view. If color is null, the color defaults to white.

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set

public StylingOptions headerNextStepTextColor (Integer color)

Sets the color of the text in the next step view of the navigation header. If color is null, the color defaults to white.

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set

public StylingOptions headerNextStepTextSize (Float size)

This method is deprecated.
This method is deprecated and will be removed in a future release.

Sets the size of the text in the next step view of the navigation header. If size is null, the size defaults to 16.

Parameters
size the text size in scale independent pixels (sp)
Returns
  • the object for which the method was called, with the new text size set

public StylingOptions headerNextStepTypefacePath (String path)

This method is deprecated.
This method is deprecated and will be removed in a future release.

Sets the file path of the typeface for the text in the next step view of the navigation header. If path is null, the typeface defaults to sans serif bold.

Parameters
path
Returns
  • the object for which the method was called, with the new path set

public StylingOptions headerSmallManeuverIconColor (Integer color)

Sets the color of the maneuver icon in the next step view of the navigation header. If color is null, the color defaults to white.

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set

public StylingOptions primaryDayModeThemeColor (Integer color)

Sets the primary day-mode color for the UI theme. This is used as the primary background color of the navigation header. If color is null, the color defaults to green (#ff0f9d58).

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set

public StylingOptions primaryNightModeThemeColor (Integer color)

Sets the primary night-mode color for the UI theme. This is used as the primary background color of the navigation header. If color is null, the color defaults to a dark green (#ff0b8043).

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set

public StylingOptions secondaryDayModeThemeColor (Integer color)

Sets the secondary day-mode color for the UI theme. This is used as the background color of the next step and lane guidance views in the navigation header. If color is null, the color defaults to a dark green (#ff0d904f).

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set

public StylingOptions secondaryNightModeThemeColor (Integer color)

Sets the secondary night-mode color for the UI theme. This is used as the background color of the next step and lane guidance views in the navigation header. If color is null, the color defaults to a dark green (#ff097138).

Parameters
color the ARGB color
Returns
  • the object for which the method was called, with the new color set