birkir / react-native-carplay

CarPlay with React Native
https://birkir.dev/react-native-carplay/
MIT License
625 stars 103 forks source link

Android Auto Change Title Color #198

Open trandung1601 opened 6 days ago

trandung1601 commented 6 days ago

I'm new to working with Android Auto and am using react-native-carplay to develop the pane template. I'm having an issue with text styles and don't have any idea how to change the title color. Does anyone know how to set the color for the detailText title?

Here is the Pane template config:

`

  import { PaneTemplate } from "react-native-carplay";
  export const paneTemplate = new PaneTemplate({
      pane: {
          items: [
              {
                  text: 'Pane',
                  detailText: 'Detail Text',
              },
          ],
      },
      title: 'Pane',
      headerAction: { type: 'back' },
  });

`

Android Auto module:

`

  import { CarPlay } from 'react-native-carplay';
  import { paneTemplate } from './templates/pane.template';

  export function AndroidAutoModule() {
    console.debug('[AndroidAutoModule]')
    CarPlay.emitter.addListener('didConnect', () => {
      CarPlay.setRootTemplate(paneTemplate);
    });
    CarPlay.emitter.addListener('backButtonPressed', () => {
      CarPlay.popTemplate();
    });
  }

`