StylingOptions

public class StylingOptions extends Object
implements Parcelable

Defines styling options for a NavigationView or NavigationFragment.

Inherited Constant Summary

Field Summary

public static final Creator<StylingOptions> CREATOR

Public Constructor Summary

StylingOptions()
Creates an object with the default styling.
StylingOptions(StylingOptions stylingOptions)
Creates an object which is a copy of the specified styling options.

Public Method Summary

int
String
getHeaderDistanceTypefacePath()
Returns the file path of the typeface for the distance text in the navigation header view.
Integer
getHeaderDistanceUnitsTextColor()
Returns the color of the distance units text in the navigation header view.
Float
getHeaderDistanceUnitsTextSize()
Returns the size of the distance units text in the navigation header view.
Integer
getHeaderDistanceValueTextColor()
Returns the color of the distance value text in the navigation header view.
Float
getHeaderDistanceValueTextSize()
Returns the size of the distance value text in the navigation header view.
Integer
getHeaderGuidanceRecommendedLaneColor()
Returns the color of the recommended lanes in the lane guidance view of the navigation header.
Float
getHeaderInstructionsFirstRowTextSize()
Returns the size of the first row of the instructions text in the navigation header view.
Float
getHeaderInstructionsSecondRowTextSize()
Returns the size of the second row of the instructions text in the navigation header view.
Integer
getHeaderInstructionsTextColor()
Returns the color of the instructions text in the navigation header view.
String
getHeaderInstructionsTypefacePath()
Returns the file path of the typeface for the instructions text in the navigation header view.
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()
Returns the size of the next step text in the navigation header view.
String
getHeaderNextStepTypefacePath()
Returns the file path of the typeface for the next step text in the navigation header view.
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.
StylingOptions
headerDistanceTypefacePath(String path)
Sets the file path of the typeface for the distance text in the navigation header view.
StylingOptions
headerDistanceUnitsTextColor(Integer color)
Sets the color of the distance units text in the navigation header view.
StylingOptions
headerDistanceUnitsTextSize(Float size)
Sets the size of the distance units text in the navigation header view.
StylingOptions
headerDistanceValueTextColor(Integer color)
Sets the color of the distance value text in the navigation header view.
StylingOptions
headerDistanceValueTextSize(Float size)
Sets the size of the distance value text in the navigation header view.
StylingOptions
headerGuidanceRecommendedLaneColor(Integer color)
Sets the color of the recommended lanes in the lane guidance view.
StylingOptions
headerInstructionsFirstRowTextSize(Float size)
Sets the size of the text in the first row of the instructions in the navigation header view.
StylingOptions
headerInstructionsSecondRowTextSize(Float size)
Sets the size of the text in the second row of the instructions in the navigation header view.
StylingOptions
headerInstructionsTextColor(Integer color)
Sets the color of the instructions text in the navigation header view.
StylingOptions
headerInstructionsTypefacePath(String path)
Sets the file path of the typeface for the instructions text in the navigation header view.
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)
Sets the size of the text in the next step view of the navigation header.
StylingOptions
headerNextStepTypefacePath(String path)
Sets the file path of the typeface for the text in the next step view of the navigation header.
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.
void
writeToParcel(Parcel out, int flags)

Inherited Method Summary

Fields

public static final Creator<StylingOptions> CREATOR

Public Constructors

public StylingOptions ()

Creates an object with the default styling.

public StylingOptions (StylingOptions stylingOptions)

Creates an object which is a copy of the specified styling options.

Parameters
stylingOptions

Public Methods

public int describeContents ()

public String getHeaderDistanceTypefacePath ()

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 ()

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 ()

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 ()

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 ()

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 ()

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 ()

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 ()

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 StylingOptions headerDistanceTypefacePath (String path)

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)

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)

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)

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)

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)

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)

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)

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

public void writeToParcel (Parcel out, int flags)

Parameters
out
flags