libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/InstructionView.java
private void initBackground() {
    if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) {
      int navigationViewPrimaryColor = ThemeSwitcher.retrieveNavigationViewThemeColor(getContext(),
        R.attr.navigationViewPrimary);
      int navigationViewBannerBackgroundColor = ThemeSwitcher.retrieveNavigationViewThemeColor(getContext(),
        R.attr.navigationViewBannerBackground);
      // Instruction Layout landscape - banner background
      if (getContext().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
        View instructionLayoutManeuver = findViewById(R.id.instructionManeuverLayout);
        Drawable maneuverBackground = DrawableCompat.wrap(instructionLayoutManeuver.getBackground()).mutate();
        DrawableCompat.setTint(maneuverBackground, navigationViewBannerBackgroundColor);
      }
      // Sound chip text - primary
      Drawable soundChipBackground = DrawableCompat.wrap(soundChipText.getBackground()).mutate();
      DrawableCompat.setTint(soundChipBackground, navigationViewPrimaryColor);
    }
  }
/**
   * For API 21 and lower, manually set the drawable tint based on the colors
   * set in the given navigation theme (light or dark).
   */
For API 21 and lower, manually set the drawable tint based on the colors
set in the given navigation theme (light or dark).
For API 21 and lower manually set the drawable tint based on the colors set in the given navigation theme ( light or dark ) .
private void initBackground() {
    if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) {
      int navigationViewPrimaryColor = ThemeSwitcher.retrieveNavigationViewThemeColor(getContext(),
        R.attr.navigationViewPrimary);
      int navigationViewBannerBackgroundColor = ThemeSwitcher.retrieveNavigationViewThemeColor(getContext(),
        R.attr.navigationViewBannerBackground);
      if (getContext().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
        View instructionLayoutManeuver = findViewById(R.id.instructionManeuverLayout);
        Drawable maneuverBackground = DrawableCompat.wrap(instructionLayoutManeuver.getBackground()).mutate();
        DrawableCompat.setTint(maneuverBackground, navigationViewBannerBackgroundColor);
      }
      Drawable soundChipBackground = DrawableCompat.wrap(soundChipText.getBackground()).mutate();
      DrawableCompat.setTint(soundChipBackground, navigationViewPrimaryColor);
    }
  }
private void initBackground ( ) { if ( android . os . Build . VERSION . SDK_INT < android . os . Build . VERSION_CODES . LOLLIPOP ) { int navigationViewPrimaryColor = ThemeSwitcher . retrieveNavigationViewThemeColor ( getContext ( ) , R . attr . navigationViewPrimary ) ; int navigationViewBannerBackgroundColor = ThemeSwitcher . retrieveNavigationViewThemeColor ( getContext ( ) , R . attr . navigationViewBannerBackground ) ; if ( getContext ( ) . getResources ( ) . getConfiguration ( ) . orientation == Configuration . ORIENTATION_LANDSCAPE ) { View instructionLayoutManeuver = findViewById ( R . id . instructionManeuverLayout ) ; Drawable maneuverBackground = DrawableCompat . wrap ( instructionLayoutManeuver . getBackground ( ) ) . mutate ( ) ; DrawableCompat . setTint ( maneuverBackground , navigationViewBannerBackgroundColor ) ; } Drawable soundChipBackground = DrawableCompat . wrap ( soundChipText . getBackground ( ) ) . mutate ( ) ; DrawableCompat . setTint ( soundChipBackground , navigationViewPrimaryColor ) ; } }
For API 21 and lower, manually set the drawable tint based on the colors
 set in the given navigation theme (light or dark).
For API 21 and lower manually set the drawable tint based on the colors set in the given navigation theme ( light or dark ) .
// Instruction Layout landscape - banner background // Sound chip text - primary